What problem does it solve?
Provides clear, practical guidance for creating, customizing, and optimizing Three.js geometry so developers can build performant 3D meshes, point clouds, lines, and instanced objects without guessing attribute formats or GPU workflows.
Core Features & Use Cases
- Built-in shapes & advanced primitives: Examples for Box, Sphere, Plane, Torus, Lathe, Extrude, Text, and more to quickly prototype scenes.
- Custom BufferGeometry & attributes: Patterns for positions, normals, uvs, indices, colors, interleaved buffers, and indexed meshes for GPU-efficient data layouts.
- Instancing & performance: Recipes for InstancedMesh, per-instance attributes, merging geometries, computing tangents, morph targets, and proper disposal to reduce draw calls and memory use.
- Use Case: Convert high-count particle or crowd renders to instanced workflows, or create custom extruded and lathed meshes with correct UVs and normals for PBR rendering.
Quick Start
Use threejs-geometry to create a custom BufferGeometry with positions, normals, uvs, and indices, then render thousands of instances via InstancedMesh while minimizing draw calls.