threejs-builder
Skill2 starsChanged 51 days agoMITView on GitHub
Comprehensive guide and production patterns for Three.js and WebGL 3D development. Use this skill whenever building, modifying, debugging, or optimizing Three.js scenes, render pipelines, shaders, PBR materials, lighting & shadow maps, cameras, GLTF/GLB loaders, instanced rendering, memory leak prevention, and WebGL performance.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- chongdashu/vibejam-starter-packtheir own version, first seen Apr 15, 2026
- chongdashu/threejs-tactics-gametheir own version, first seen Mar 6, 2026
- OoadaioO/agent-skillstheir own version, first seen Feb 15, 2026
- chongdashu/threejs-capacitor-ios-gametheir own version, first seen Feb 13, 2026
- chongdashu/threejs-toonshootertheir own version, first seen Jan 5, 2026
- chongdashu/threejs-forest-censustheir own version, first seen Dec 31, 2025
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- chongdashu/vibejam-starter-pack★ 147same name
- chongdashu/cc-skills-nanobananapro★ 138same name
- chongdashu/threejs-toonshooter★ 79same name
- chongdashu/threejs-capacitor-ios-game★ 57same name
- chongdashu/threejs-forest-census★ 34same name
- chongdashu/threejs-tactics-game★ 29same name
- OoadaioO/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- game-devSkill
- find-skillsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Every unique mesh, material, or non-instanced object incurs CPU-to-GPU overhead (a draw call).
- Very specific: line 24
Use InstancedMesh for repeated objects (bullets, foliage, enemies, props).
- Very specific: line 25
Use BatchedMesh (Three.js r159+) or BufferGeometryUtils.mergeGeometries for static scenery.
- Very specific: line 29
Never pass raw window.devicePixelRatio without clamping!
- Distinctive: line 52
Read the following specialized references when working on specific subsystems:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Three.js Builder & 3D WebGL Mastery
This skill provides production-grade architectural patterns, memory management runbooks, and performance optimizations for Three.js and WebGL applications.
The Golden Commandments of Three.js
- VRAM Is Not Garbage-Collected Automatically:
JavaScript garbage collection only frees CPU references. GPU resources (
Geometry,Material,Texture,RenderTarget) remain leaked in WebGL VRAM unless explicitly freed via.dispose(). Always implement explicit teardown lifecycles. 👉 See references/memory-and-disposal.md for recursive disposal patterns. - Respect the Draw Call Budget:
Every unique mesh, material, or non-instanced object incurs CPU-to-GPU overhead (a draw call). Target < 50-100 draw calls for smooth 60-120 FPS.
- Use
InstancedMeshfor repeated objects (bullets, foliage, enemies, props). - Use
BatchedMesh(Three.js r159+) orBufferGeometryUtils.mergeGeometriesfor static scenery. 👉 See references/performance-and-instancing.md.
- Use
- Clamp Device Pixel Ratio:
Never pass raw
window.devicePixelRatiowithout clamping! 3x or 4x Retina screens will cause severe fill-rate bottlenecks.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); - Clamp Animation Delta Time:
Tab switching or lag spikes produce huge
deltavalues that can catapult physics objects or break animations. Always clamp:const dt = Math.min(clock.getDelta(), 0.1); // clamp to max 100ms - Linear Workflow & Color Management:
Configure modern color spaces and tone mapping immediately during initialization:
renderer.outputColorSpace = THREE.SRGBColorSpace; renderer.toneMapping = THREE.ACESFilmicToneMapping; renderer.toneMappingExposure = 1.0;
Architectural Breakdown & Subdocs
Read the following specialized references when working on specific subsystems:
- Memory Management & Disposal: references/memory-and-disposal.md
- Recursive scene disposal, texture de-allocation, WebGL context loss prevention.
- Performance, Instancing & Batching: references/performance-and-instancing.md
InstancedMesh,BatchedMesh, frustum culling, LOD, draw call debugging.
- Lighting & Soft Shadows: references/lighting-and-shadows.md
- Directional light shadow camera frustum sizing, shadow bias & normalBias, PCFSoftShadowMap, HDR environment maps.
- Materials & Custom Shaders: references/materials-and-shaders.md
MeshStandardMaterialvsMeshPhysicalMaterial,onBeforeCompilechunk injection, custom GLSLShaderMaterial, shader warmup.
- Asset Loading & GLTF Pipelines: references/asset-loading-and-draco.md
GLTFLoader,DRACOLoader,KTX2Loader, model bounding box normalization, animation mixers.
- Cameras & Controls: references/cameras-and-controls.md
- Smooth follow third-person camera (damped lerp/slerp), camera occlusion raycasting, resize handling.
Standard Boilerplate Template
For a clean, battle-tested setup with responsive resizing, tone mapping, and teardown support, refer to: 👉 examples/boilerplate-scene.js
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

