What problem does it solve?
Creating and rendering 3D shapes efficiently in Three.js can be slow and error-prone when you need custom meshes, GPU-friendly BufferGeometry, or instanced rendering for performance.
Core Features & Use Cases
- Built-in geometry generators: Create common primitives like box, sphere, plane, cylinder, torus, and text-ready geometry quickly for prototypes and gameplay assets.
- Custom BufferGeometry workflows: Define vertex attributes (position, normal, UV, color), indices, and interleaved buffers for GPU-efficient meshes.
- High-performance rendering patterns: Use InstancedMesh and InstancedBufferGeometry to draw many repeated objects (e.g., crowds, loot, terrain props) with fewer draw calls.
- Editing & utilities: Recompute normals/bounds, merge geometries, and generate edges/wireframes to support debugging and production tooling.
Quick Start
Use threejs-geometry to create a custom BufferGeometry for a mesh by defining position, normal, and index attributes and then rendering it with a standard material.