feat(tabletop): author rotation and tilt angles in degrees

Convert bgm rotation and tilt values to radians only at the three.js
boundary, so the format's angles are authored in degrees.
This commit is contained in:
2026-08-10 00:11:13 +08:00
parent 90baa35c7c
commit b312bf4f1f
6 changed files with 13 additions and 9 deletions
@@ -10,7 +10,7 @@ import type { Package } from '@tts/bgm';
import { useRenderState, placementKey } from '../state.js';
import { PartPlacement } from '../placement.js';
import type { MountNode } from '../mount.js';
import { MM_TO_WORLD } from '../part.js';
import { MM_TO_WORLD, DEG_TO_RAD } from '../part.js';
import { SurfaceBounds } from './SurfaceBounds.js';
import { SurfacePlane } from './SurfacePlane.js';
@@ -42,7 +42,7 @@ export function SurfaceNode({
return (
<group
position={[node.x * MM_TO_WORLD, 0, node.y * MM_TO_WORLD]}
rotation={[0, node.rotation, 0]}
rotation={[0, node.rotation * DEG_TO_RAD, 0]}
>
{showSurface && (
<>