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:
@@ -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 && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user