threejs-scene · cesartevisual — Claude Code skill: what it does, how to install
This skill for Claude Code configures Three.js scene hierarchies, camera framing, coordinate transforms, and renderer lifecycles. It enforces proper GPU cleanup and bounds calculations.
MIT 671 installs ★ 26 updated 2026-09-10
npx skills add cesartevisual/threejs-skills --skill threejs-scene -a claude-codeWhat threejs-scene does
Sets up Three.js scenes, coordinate systems, and render loops according to engine best practices. It isolates imported model transforms inside interaction groups, relies on quaternion interpolation, and updates world matrices before running synchronous bounding checks.
For camera framing, it fits perspective viewports against both horizontal and vertical fields of view so wide models do not get cut off. Canvas sizing tracks the parent element through ResizeObserver while keeping CSS layout values separate from drawing buffer dimensions.
Disposing of the renderer alone leaves scene assets in GPU memory. The instructions enforce stopping animation loops, disconnecting resize observers, and explicitly releasing textures, geometries, and materials during teardown.
What it helps with
- fit perspective camera bounds across horizontal and vertical axes
- isolate model pivot transforms using Three.js groups
- handle canvas resizing with ResizeObserver without altering CSS
- clean up GPU resources and stop render loops on unmount
Example prompts for the agent
- Frame the perspective camera to fit this wide 3D model without clipping the edges.
- Convert these Euler rotations to quaternion interpolation and reuse vectors in the render loop.
- Implement a teardown routine that stops the render loop and releases all Three.js GPU resources.
How to install threejs-scene
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-scene -a claude-code2Manually: put the files in place
~/.claude/skills/threejs-scene/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/threejs-scene/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-scene -a codex2Manually: put the files in place
.agents/skills/threejs-scene/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-scene -a cursor2Manually: put the files in place
.cursor/skills/threejs-scene/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cesartevisual/threejs-skills skills/threejs-scene2Manually: put the files in place
.github/skills/threejs-scene/SKILL.md1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-scene -a gemini-cli2Platform CLI
gemini skills install https://github.com/cesartevisual/threejs-skills --path skills/threejs-sceneManually: put the files in place
.devin/skills/threejs-scene/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-scene -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about threejs-scene
How to install threejs-scene in Claude Code?
Run npx skills add cesartevisual/threejs-skills --skill threejs-scene -a claude-code. Alternatively, place the file directly at ~/.claude/skills/threejs-scene/SKILL.md.
What does threejs-scene do?
It guides coding agents on Three.js scene architecture, matrix transformations, camera FOV calculations, and responsive canvas sizing.
Does disposing the renderer clean up the entire scene?
Calling dispose on the renderer does not free scene geometries or textures. You must explicitly dispose of scene resources, remove listeners, and stop the animation loop.
Source text
SKILL.md · MIT
--- name: threejs-scene description: "Build or correct Three.js scene hierarchies, camera framing, coordinate transforms, and responsive renderer lifecycles." --- # Scenes, Cameras, and Math Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions. Inspect the host element size, renderer ownership, world scale, handedness, up axis, and camera type before changing the scene. Prefer a single renderer for one experience; use viewports/scissors when multiple views genuinely benefit from shared resources. Separate imported model transforms from interaction pivots using groups. Distinguish local and world coordinates; update world matrices before synchronous bounds or coordinate queries when transforms just changed. Use quaternion interpolation for orientations and reusable vectors in hot paths. Avoid repeatedly converting between Euler angles and quaternions. Fit a perspective camera against object bounds and both horizontal and vertical field of view; fitting only height can crop a wide subject. Choose a positive near plane and useful far plane for perspective depth precision. Orthographic cameras may use a zero near plane. Update the projection matrix after projection changes. Size from the canvas container with ResizeObserver, skip zero dimensions, and keep CSS size separate from drawing-buffer size. Apply a deliberate pixel-ratio budget. Update camera, renderer, and size-dependent render targets together. Do not overwrite layout CSS with renderer sizing. Use one render-loop owner. setAnimationLoop integrates with XR; an existing framework or requestAnimationFrame loop can be valid outside XR. Stop the loop, disconnect observers, remove listeners, and release owned GPU resources on teardown. Renderer disposal alone does not dispose scene resources. Verify a non-square container, mobile orientation, hidden-to-visible transitions, repeated mounting, and framing of unusually wide or tall assets. ## API reference Consult the [official documentation](https://threejs.org/docs/pages/PerspectiveCamera.html) for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.
© cesartevisual · MIT · cesartevisual/threejs-skills
Similar skills
All skills for Frontend and UI →threejs-scene by other authors comes first.