Add animation controller system, material assets and skeleton visualization

- .animctrl state machine asset (params/transitions/blend trees, 1D+2D
  directional blending) with Unity Animator-style editor panel: state
  list, transitions, params, directional pad preview driving live
  CrossFade on the selected entity
- Split animation evaluation out of SceneRenderer into
  AnimationSystem/AnimationEvaluator; skin palettes with rest-pose
  fallback and blend-weight epsilon filtering
- MaterialAsset (.material) with reload-safe preview tile pool
  (DropMaterial clears dirty refs before instance destruction)
- EditorGizmoPass skeleton wires + viewport joint overlay; camera
  projection rework (baked Vulkan Y-flip, ortho support)
- Editor/game build split via HELLOVULKAN_EDITOR option
This commit is contained in:
2026-10-07 01:50:04 +08:00
parent a941207ae3
commit cc837bc605
71 changed files with 8198 additions and 548 deletions
+12
View File
@@ -15,6 +15,12 @@
#include <Engine/Renderer/EditorCamera.h>
#include <Engine/Renderer/SceneTypes.h> // kDisplayViewport / kDisplayDirect
#include <entt/entt.hpp>
class MaterialEditorPanel; // 面板间联动通道(Details 双击槽位 / Content
// Browser 双击 .material → 打开材质编辑器)
class ControllerEditorPanel; // Details Controller 槽 Edit → 打开控制器编辑器
// 沙盒特有状态(面板可选读取,空指针 = 该面板区块不显示)
struct EditorContext {
// 引擎门面
@@ -25,6 +31,12 @@ struct EditorContext {
// 编辑器相机(Scene view 专用,归 Renderer 持有——与场景相机实体
// 无关;面板经此做 F 焦点/Gizmo 视图/对齐跳转)
Engine::EditorCamera *editorCamera = nullptr;
// 材质编辑器面板(Editor 持有;指派/编辑分离的联动入口)
MaterialEditorPanel *materialEditor = nullptr;
// 控制器编辑器面板(Editor 持有;指派/编辑分离的联动入口)
ControllerEditorPanel *controllerEditor = nullptr;
// 当前选中实体(Controller 编辑器 Preview 的驱动目标)
entt::entity *selected = nullptr;
// PIE 运行态(Play-In-Editor):Editor 持有,只读指针。
// 面板门控用——运行态禁 Gizmo/编辑器热键,渲染源已是 primary 相机