Task 557: Add inertial/ship viewpoint switching to 3D viewer
完了 ← タスク一覧
Task 557: Add inertial/ship viewpoint switching to 3D viewer
Status: DONE
Summary
Added viewpoint switching between inertial frame (fixed center) and ship frame
(camera follows the ship marker) in the 3D orbital viewer.
Changes
- Added
ViewModetype ("inertial" | "ship") andsupportedViewModestoSceneData - All 3 scenes now declare support for both view modes
- Renderer:
setViewMode/getViewModeexports, camera tracking inupdateTimelineFrame - HTML: "慣性/宇宙船" toggle button in timeline controls
How ship-frame works
- Camera target follows ship marker position during animation
- Camera maintains offset (5, 8, 10) from ship for good viewing angle
- Switching back to inertial resets camera to scene center
- User can still drag to rotate/zoom in both modes
Tests added (2 new)
orbital-3d-viewer-data.test.ts: full-route supports both view modesorbital-3d-viewer-data.test.ts: Saturn scene supports both view modes
Files changed
ts/src/orbital-3d-viewer-data.ts— ViewMode type, supportedViewModests/src/orbital-3d-viewer-data.test.ts— 2 new tests (33→35)ts/src/orbital-3d-viewer.js— setViewMode, getViewMode, ship-frame camera trackingts/examples/orbital-3d.html— view mode button + handler
Impact
- Stats: 4,031 TS tests
- Human directive phase 29 item (3) addressed: viewpoint switching