| name | three-skilld |
| description | ALWAYS use when writing code importing "three". Consult for debugging, best practices, or modifying three, three.js. |
| metadata | {"version":"0.185.0","generated_by":"Anthropic · Haiku 4.5","generated_at":"2026-06-29T00:00:00.000Z"} |
mrdoob/three.js three@0.185.0
Tags: latest: 0.185.0
References: package.json • README • Docs • Issues
Search
Use skilld search "query" -p three instead of grepping .skilld/ directories. Run skilld search --guide -p three for full syntax, filters, and operators.
Best Practices
-
Use InstancedMesh for rendering many objects with identical geometry and material but different transformations — reduces draw calls dramatically for performance-critical scenes source
-
Set needsUpdate = true on instanceMatrix after calling setMatrixAt() and on instanceColor after setColorAt() to notify the engine of transformation changes source
-
Always call dispose() on InstancedMesh, BatchedMesh, and EffectComposer when no longer used to free GPU resources and prevent memory leaks source
-
Use BatchedMesh for rendering large numbers of objects with the same material but different geometries — provides multi-draw batch rendering to reduce draw calls source
-
Reserve buffer space when adding geometries to BatchedMesh if planning to replace with larger geometries later via the reservedVertexCount and reservedIndexCount parameters source
-
Set needsUpdate = true on materials after modifying properties to trigger shader recompilation and reflect changes in the next render source
-
Disable depth writing for 2D overlays by setting depthWrite = false to layer elements without z-index artifacts source
-
Use depthTexture instead of depthBuffer on render targets for post-processing to access depth data in shaders source
-
Enable MSAA on render targets by setting samples to a value > 0 (typically 4 or 8) for smoother output, but balance against performance cost source
-
Disable generateMipmaps and set it to false if creating mipmaps manually to avoid redundant automatic generation source
-
Dispose and recreate textures to change dimensions, format, or type — modifying these properties directly after first use has no effect source
-
Set global = true on nodes that should be declared only once (e.g., AttributeNode) in shader graph systems to leverage the internal caching system source
-
Update AnimationMixer with delta time in the render loop via mixer.update(deltaTime) to advance animations smoothly source
-
Call AnimationMixer.uncacheAction(), uncacheClip(), or uncacheRoot() to deallocate memory resources, but ensure related actions are stopped first source