Three.js Fundamentals (Scene · Camera · Renderer)
A precise three.js r186 reference for scene setup, cameras, renderers, the animation loop, core math, cleanup, and WebGPU/TSL.
Dev & CodingIntermediate★ 497⑂ 55AI score 9/10Last updated: Nov 24, 2026
What it does
- Gives canonical three.js r186 setup code:
WebGLRendereroptions, pixel-ratio capping, tone mapping, resize handling, and asetAnimationLoopframe loop. - Covers four camera types (Perspective, Orthographic, ArrayCamera, CubeCamera) with the gotchas that break them (drawing-buffer viewport units, hiding reflective meshes).
- Explains
Object3Dhierarchies: transforms,addvsattach, layers,traverse, manual matrix updates. - Provides a math cheat sheet for Vector3, Matrix4, Quaternion, Euler, Color and MathUtils.
- Has a dedicated WebGPU + TSL section:
await renderer.init(), NodeMaterials, the four-key import map, WebGL 2 fallback detection. - Documents a full dispose routine to avoid GPU memory leaks, plus
renderer.infofor draw-call auditing. - Ends with a Common Mistakes migration list fixing deprecated APIs (
Clock,PCFSoftShadowMap,outputEncoding,physicallyCorrectLights,renderAsync,three/examples/jsmspecifiers).
Who it's for
- Front-end devs building web 3D scenes with three.js from scratch.
- Anyone migrating older tutorial code to a modern three.js release.
- Graphics developers evaluating a move from WebGL to WebGPU/TSL.
- Teams tired of AI-generated three.js code that mixes in long-removed APIs.
Example uses
- "Make a rotating cube scene with no bundler" → produces the correct CDN import map plus a Timer-based loop.
- "My code warns that Clock is deprecated" → rewrites it to
THREE.Timerwithtimer.connect(document). - "Add real-time reflections to a chrome sphere" → CubeCamera code including the
visible = falsetrick beforeupdate(). - "Tear down the scene on route change" → ordered disposal of geometry, materials, textures, and the renderer itself.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/aiskillstore/marketplace/HEAD/pending/cloudai-x/threejs-fundamentals/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the pending/cloudai-x/threejs-fundamentals folder from the GitHub repo aiskillstore/marketplace into my ~/.claude/skills/threejs-fundamentals/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/aiskillstore/marketplace.git /tmp/aiskillstore && mkdir -p ~/.claude/skills && cp -r /tmp/aiskillstore/pending/cloudai-x/threejs-fundamentals ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal (Terminal on macOS/Linux, Git Bash on Windows).
- Clone the skill repository to a temp folder:
git clone https://github.com/aiskillstore/marketplace.git /tmp/aiskillstore - Create the Claude Code skills directory if it doesn't exist:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r /tmp/aiskillstore/pending/cloudai-x/threejs-fundamentals ~/.claude/skills/ - Verify with
ls ~/.claude/skills/threejs-fundamentals— you should seeSKILL.md. - Restart Claude Code, then ask something like "set up a basic three.js scene" to trigger it.
- (Optional) Copy the companion skills it references, such as
threejs-geometryandthreejs-materials, for broader coverage.