feat: 旋转单位改为度并支持轨迹点拖拽

统一数据模型中的旋转为度数并在渲染时转弧度,新增 InspectorAngleField 角度控件,为场景与轨迹点提供滑块和重置按钮;选中轨迹点时角色预览到该点并支持拖拽 gizmo 调整位置;机位点击统一走 selectObject 以正确切换右侧属性卡片。
This commit is contained in:
2026-09-17 11:18:58 +08:00
parent e74cf6d28b
commit 0794486857
21 changed files with 659 additions and 99 deletions

View File

@@ -27,12 +27,14 @@ it("maps the scene scale onto all three axes", () => {
});
});
it("passes the scene position and rotation through unchanged", () => {
expect(getSceneGroupTransform(createScene({ position: [1, 3, -2], rotation: [0, 0.5, 0] }))).toEqual({
position: [1, 3, -2],
rotation: [0, 0.5, 0],
scale: [1, 1, 1],
});
it("converts the scene rotation from degrees to radians for the Three.js group", () => {
const transform = getSceneGroupTransform(createScene({ position: [1, 3, -2], rotation: [0, 90, 180] }));
expect(transform.position).toEqual([1, 3, -2]);
expect(transform.rotation[0]).toBeCloseTo(0);
expect(transform.rotation[1]).toBeCloseTo(Math.PI / 2);
expect(transform.rotation[2]).toBeCloseTo(Math.PI);
expect(transform.scale).toEqual([1, 1, 1]);
});
it("keeps the ground plane and the viewport grid on the same world height", () => {