
threejs-camera
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.
- Installs
- 410
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-camera- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads threejs-camera automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
FAQ
What does the threejs-camera skill do?
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.
How do I install threejs-camera?
Run npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-camera in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/threejs-camera/ (personal) or .claude/skills/threejs-camera/ (project).
Which AI agents can use threejs-camera?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is threejs-camera safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains threejs-camera?
It is published by full-stack-skills in full-stack-skills/threejs-skills. It has 410 recorded installs.
More from full-stack-skills/threejs-skills
threejs-postprocessing
full-stack-skills/threejs-skills
Addon screen-space post-processing for three.js using EffectComposer, Pass base class, RenderPass, and stock passes such as UnrealBloomPass, SSAOPass, SSRPass, BokehPass, OutlinePass, FXAAPass/SMAAPass, TAARenderPass, and ShaderPass; references the Shaders addon group for underlying shader modules; contrasts with core PostProcessing class used in node/WebGPU stacks (see threejs-node-tsl and threejs-renderers). Use when building composer chains—not for basic renderer tone mapping alone (threejs-renderers).
threejs-objects
full-stack-skills/threejs-skills
three.js scene graph objects: Object3D transforms and hierarchy, Group, Mesh, InstancedMesh, SkinnedMesh, BatchedMesh, LOD, Line/LineLoop/LineSegments, Points, Sprite, Bone, Skeleton, ClippingGroup; interaction via Raycaster, Layers masks, and EventDispatcher patterns. Merges the former interaction scope—use for picking and layers; for pure vector math without scene graph use threejs-math; for playing skeletal clips use threejs-animation; for frustum culling internals see camera docs.
threejs-materials
full-stack-skills/threejs-skills
Open the skill to read its SKILL.md instructions.
threejs-animation
full-stack-skills/threejs-skills
Open the skill to read its SKILL.md instructions.
threejs-renderers
full-stack-skills/threejs-skills
Open the skill to read its SKILL.md instructions.
threejs-dev-setup
full-stack-skills/threejs-skills
Bootstrap and toolchain guidance for three.js applications using npm, Vite/Webpack/Rollup, bare ESM import maps, and TypeScript. Covers canonical import paths for three core versus three/addons/ (examples/jsm re-exports), version alignment with https://threejs.org/docs/, and fixing "module not found" for loaders and controls. Use when scaffolding a new 3D project, migrating bundler, or debugging resolution of addons—do not use for rendering API details (see threejs-renderers) or asset loading logic (see threejs-loaders).
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.