threejs-geometry-management
Installation
SKILL.md
Three.js Geometry Management
When to Use
Use this skill when:
- Creating or modifying 3D geometry in Three.js
- Optimizing geometry for mobile performance
- Implementing instancing for repeated objects
- Building custom geometry procedurally
- Managing geometry memory and disposal
Core Principles
- BufferGeometry Over Geometry: Always use BufferGeometry for performance
- Attribute Efficiency: Use typed arrays and minimize attribute count
- Instancing for Duplicates: Use InstancedMesh for repeated geometry
- Indexed Geometry: Share vertices with indices to reduce memory
- Dispose Properly: Clean up geometry to prevent memory leaks
- LOD Strategy: Use different detail levels based on distance