LumosLab-Innovation/3D-lab-skills / plugins/threejs-lab/skills/threejs-camera-direction
threejs-camera-direction
VerifiedDirect 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.
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
lerpand orientation withslerp. - 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.
Source: Scott Sun, MIT. Adapted by LumosLab: example assets remain linked to pinned upstream source; skill instructions and references are bundled. See LICENSE.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |