threejs
Installation
SKILL.md
Three.js
Use this skill when work touches Three.js: scene/camera/renderer setup, render loop, geometry, materials, textures, lights/shadows, glTF assets, animation, picking, controls, post-processing, WebGPU/TSL, XR, performance/memory, TypeScript/bundling, or version upgrades.
Snapshot: three@0.186.1 = r186 (2026-09-24), @types/three@0.186.0. Next dev line is r187 (migration notes exist, not released). Refresh from source-map.md if versions differ.
Workflow
- Inspect the project:
threeversion (npm0.x.y= releaser<x>),@types/threematch, renderer in use (WebGLRenderervsthree/webgpu), bundler/import map, loop style (setAnimationLoopvs custom rAF), React wrapper (R3F) or vanilla. - Everyday setup, loop, resize, geometry, picking, controls: usage-guide.md.
- Materials, textures, color space, lights, shadows, environment maps: materials-textures-lighting.md.
- glTF/Draco/Meshopt/KTX2 loading and the animation system: loaders-animation.md.
WebGPURenderer, node materials, TSL, compute,RenderPipeline: webgpu-tsl.md.- Draw calls, instancing, memory/dispose,
EffectComposer, profiling: postprocessing-performance.md. - Addon locations (
three/addons/*groups, package entry points): addons-index.md. - React (R3F v9, drei, Canvas, hooks, WebGPU
glfactory): react-three-fiber.md. Companion packages (postprocessing, three-mesh-bvh, gltf-transform, Rapier, troika, pathtracer) with versions and compatibility: ecosystem-packages.md. - Upgrades and deprecations (r170 to r186): migration.md. Official URLs to refresh: source-map.md.
- Verify:
bunx tsc --noEmit, a production build, console clean ofTHREE.warnings,renderer.infostable across a mount/unmount cycle.