사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-camera시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
When to use this skill
ALWAYS use this skill when the user mentions:
- Switching perspective vs orthographic,
fov,aspect,zoom,near,far CubeCamerafor real-time environment maps or reflections (update rate caveats)ArrayCamera/StereoCamerafor 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:
- "PerspectiveCamera", "OrthographicCamera", "CubeCamera", "aspect", "near", "far"
- "透视相机", "正交", "立方体相机"
How to use this skill
- Perspective: set
aspect= width/height; update on resize (threejs-renderers example workflow). - Orthographic: define
left/right/top/bottomin world units for CAD/2.5D views. - Near/far: balance depth precision vs containing scene bounds; relate to fog (threejs-scenes).
- CubeCamera: position at reflection probe; call
updatewhen scene static enough; use render target outputs per docs. - Stereo/Array: advanced; cite docs for eye parameters; defer XR to threejs-webxr.
- Projection matrix: call
updateProjectionMatrix()after parameter edits. - Helpers:
CameraHelperlives in threejs-helpers.
See examples/workflow-perspective-resize.md.
Doc map (official)
| 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 |
Scope
- In scope: Core camera classes and parameters; cube/array/stereo overview.
- Out of scope: WebXR reference spaces, eye matrices, session lifecycle (threejs-webxr); shadow map camera tuning (threejs-lights); pass-internal cameras in composer (threejs-postprocessing).
Common pitfalls and best practices
- Wrong
aspectafter resize stretches image—always sync with canvas. - Too small
nearhurts depth precision in large worlds. CubeCameraevery frame is expensive—throttle for performance.
Documentation and version
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.
Agent response checklist
When answering under this skill, prefer responses that:
- Link
PerspectiveCamera,OrthographicCamera, orCubeCameraas relevant. - Pair resize with threejs-renderers
setSize/ DPR patterns when relevant. - Route
XR/WebXRManagerquestions to threejs-webxr after one-line renderer mention. - Mention
updateProjectionMatrix()after intrinsic changes. - Use threejs-helpers
CameraHelperfor shadow frustum debug when discussing lights.
References
- https://threejs.org/docs/#Cameras
- https://threejs.org/docs/PerspectiveCamera.html
- https://threejs.org/docs/CubeCamera.html
Keywords
English: perspectivecamera, orthographiccamera, cubecamera, projection, aspect, near, far, three.js
中文: 相机、透视、正交、投影、近裁剪、远裁剪、CubeCamera、three.js