Camera Direction
Treat the camera as an authored visual system, not a passive viewport. Compose
the subject, establish scale, choose a stable up frame, and make every mode
handoff explicit.
Build order
- Define the design frame: subject size, screen occupancy, lens, near/far,
motion, and horizon/up convention.
- Build camera targets in semantic frames: ship, body surface, docking axis,
or scene-authored shot.
- Derive position and orientation independently, then combine them once.
- Add input orbit/look only inside declared yaw/pitch and spatial constraints.
- Add frame-rate-independent follow or a bounded spring where the reference
uses inertia.
- Snapshot and restore camera projection/state when a scene owns it.
- Test mode transitions, cuts, pointer-lock reacquisition, resize, and large
coordinates.
Read references/camera-rig-and-cinematic-systems.md
for exact chase/side/orbit rigs, projection values, transition
rules, floating-origin shot, pointer controls, and implementation limits.
Non-negotiable rules
- Use subject dimensions to derive offsets; do not tune one fixed distance for
differently scaled assets.
- For planetary motion, derive up from the dominant body rather than global Y.
- Interpolate position with
lerp and orientation with slerp.
- During an explicit handoff, use one interpolation stage. Do not stack a
transition blend and a second follow smoother over the same interval.
- Re-sync yaw/pitch from the camera when pointer lock is acquired.
- Update the projection matrix whenever FOV, near, far, or aspect changes.
- Keep stars or infinite backgrounds camera-relative when large translation
would create false parallax or precision loss.
- Restore camera and input ownership on scene disposal.
Routing boundary
Use $threejs-procedural-animation for object motion timelines, springs,
docking, staging, and debris. This skill owns how the scene is viewed and how
camera modes hand off.
1---2name: threejs-camera-direction3description: Direct advanced Three.js camera systems. Use for scale-aware chase rigs, thrust lag, side/orbit cameras, body-relative up vectors, quaternion handoffs, authored cinematic framing, floating origins, pointer-look controls, camera collision constraints, projection ownership, and lifecycle restoration.4---5
6# Camera Direction
7
8Treat the camera as an authored visual system, not a passive viewport. Compose
9the subject, establish scale, choose a stable up frame, and make every mode
10handoff explicit.
11
12## Build order
13
141. Define the design frame: subject size, screen occupancy, lens, near/far,
15 motion, and horizon/up convention.
162. Build camera targets in semantic frames: ship, body surface, docking axis,
17 or scene-authored shot.
183. Derive position and orientation independently, then combine them once.
194. Add input orbit/look only inside declared yaw/pitch and spatial constraints.
205. Add frame-rate-independent follow or a bounded spring where the reference
21 uses inertia.
226. Snapshot and restore camera projection/state when a scene owns it.
237. Test mode transitions, cuts, pointer-lock reacquisition, resize, and large
24 coordinates.
25
26Read [references/camera-rig-and-cinematic-systems.md](references/camera-rig-and-cinematic-systems.md)
27for exact chase/side/orbit rigs, projection values, transition
28rules, floating-origin shot, pointer controls, and implementation limits.
29
30## Non-negotiable rules
31
32- Use subject dimensions to derive offsets; do not tune one fixed distance for
33 differently scaled assets.
34- For planetary motion, derive up from the dominant body rather than global Y.
35- Interpolate position with `lerp` and orientation with `slerp`.
36- During an explicit handoff, use one interpolation stage. Do not stack a
37 transition blend and a second follow smoother over the same interval.
38- Re-sync yaw/pitch from the camera when pointer lock is acquired.
39- Update the projection matrix whenever FOV, near, far, or aspect changes.
40- Keep stars or infinite backgrounds camera-relative when large translation
41 would create false parallax or precision loss.
42- Restore camera and input ownership on scene disposal.
43
44## Routing boundary
45
46Use `$threejs-procedural-animation` for object motion timelines, springs,
47docking, staging, and debris. This skill owns how the scene is viewed and how
48camera modes hand off.