Add Camera Controls
Add the canonical camera-control hook to the user's existing scene without copying the Threenix demo.
Workflow
- Read the target repository's instructions and inspect its package manager, dependencies, Canvas, camera setup, controls, scene composition, and relevant input or shot logic.
- Confirm the hook will run inside a React Three Fiber Canvas and that no other active controller writes the same camera. It updates the camera at frame priority
-1; do not silently remove a conflicting controller. - Call the
get_component_referencetool from thethreenixMCP server with{ "slug": "camera-controls" }. If the tool or authentication is unavailable, stop and explain the problem; do not reconstruct the reference from local or bundled sources. - Choose one destination root near the target scene. Write only the returned
files[]beneath it at each relativepath: writeutf-8content verbatim and decodebase64content. Never flatten or rename returned paths. - Follow the returned
integrationNotes. CalluseCameraControlsfrom a component inside the existing Canvas and wire only the requestedsetLookAt, pointer, or distance behavior. Preserve the target's Canvas, renderer, scene, postprocessing, and UI; do not copy demo shots, clipping logic, Leva controls, or backgrounds. - Install only returned dependency names absent from the target manifest, pinned to the returned versions and using the existing package manager. Do not replace existing version ranges or add demo-only dependencies.
- Run the narrowest type-check or build covering the edited scene and report any unresolved controller or version incompatibility.