skills/threejs-skills/threejs-camera/SKILL.md
three.js cameras: Camera base, PerspectiveCamera, OrthographicCamera, CubeCamera, ArrayCamera, StereoCamera; projection matrices, aspect, FOV, orthographic frustum sizes, near/far planes, and dynamic environment maps with CubeCamera. Use when placing views, rendering reflections, or multi-view splits; for XR projections and eye matrices use threejs-webxr; for post pass camera tricks use threejs-postprocessing alongside threejs-renderers.
npx skillsauth add partme-ai/full-stack-skills threejs-cameraInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ALWAYS use this skill when the user mentions:
fov, aspect, zoom, near, farCubeCamera for real-time environment maps or reflections (update rate caveats)ArrayCamera/StereoCamera for multi-view or stereo off-axis projection (non-XR)IMPORTANT: camera vs webxr vs post
| Topic | Skill | |-------|--------| | Standard desktop projection | threejs-camera | | XR reference spaces, IPD | threejs-webxr | | Offscreen pass cameras inside composer | threejs-postprocessing |
Trigger phrases include:
aspect = width/height; update on resize (threejs-renderers example workflow).left/right/top/bottom in world units for CAD/2.5D views.update when scene static enough; use render target outputs per docs.updateProjectionMatrix() after parameter edits.CameraHelper lives in threejs-helpers.window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
See examples/workflow-perspective-resize.md.
| Docs section | Representative links | |--------------|----------------------| | Cameras (index) | https://threejs.org/docs/#Cameras | | Cameras | https://threejs.org/docs/Camera.html | | Perspective | https://threejs.org/docs/PerspectiveCamera.html | | Orthographic | https://threejs.org/docs/OrthographicCamera.html | | Cube | https://threejs.org/docs/CubeCamera.html | | Multi-view | https://threejs.org/docs/ArrayCamera.html | | Stereo (non-XR) | https://threejs.org/docs/StereoCamera.html |
aspect after resize stretches image—always sync with canvas.near hurts depth precision in large worlds.CubeCamera every frame is expensive—throttle for performance.Camera parameters and CubeCamera update behavior follow the Cameras section of three.js docs. WebXR uses different projection paths—hand off to threejs-webxr when the user mentions headsets or reference spaces.
When answering under this skill, prefer responses that:
PerspectiveCamera, OrthographicCamera, or CubeCamera as relevant.setSize / DPR patterns when relevant.XR/WebXRManager questions to threejs-webxr after one-line renderer mention.updateProjectionMatrix() after intrinsic changes.CameraHelper for shadow frustum debug when discussing lights.English: perspectivecamera, orthographiccamera, cubecamera, projection, aspect, near, far, three.js
中文: 相机、透视、正交、投影、近裁剪、远裁剪、CubeCamera、three.js
development
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
tools
Creates new uni-app projects via the official CLI or HBuilderX with Vue 2/Vue 3 template selection, manifest.json and pages.json configuration, and directory structure setup. Use when the user wants to scaffold a new uni-app project, initialize project files with a single command, or set up the development environment.
tools
Browses, installs, configures, and manages plugins from the uni-app plugin market (ext.dcloud.net.cn) including component plugins, API plugins, and template plugins with dependency handling. Use when the user needs to find and install uni-app plugins, configure plugin settings, manage plugin dependencies, or integrate third-party components.
tools
Develops native Android and iOS plugins for uni-app including module creation, JavaScript-to-native communication, and plugin packaging for distribution. Use when the user needs to build custom native modules, extend uni-app with native capabilities (camera, Bluetooth, sensors), or create publishable native plugins.