threejs-camera
>-
>-
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.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
确保开发环境已安装必要的依赖和工具。
根据项目需求进行基础配置。
按照示例代码实现核心功能。
运行测试确保功能正常。
完成开发后进行部署和监控。