InstancedMesh
What Problem Does It Solve?
Suppose you create:
1000 Trees
Normally:
1000 Meshes 1000 Draw Calls
Very expensive.
What is a Draw Call?
A command sent to the GPU:
"Draw this object."
More draw calls = lower performance.
InstancedMesh
Allows rendering thousands of identical objects using a single draw call.
Example
const trees =
new THREE.InstancedMesh(
geometry,
material,
1000
);
Result:
1000 Trees 1 Draw Call
Massive performance improvement.
Common Uses
Grass
5000 Blades
Trees
10000 Trees
Rocks
3000 Rocks
Buildings
1000 Buildings
Best Practices
✓ Use when geometry and material are identical
✓ Perfect for repeated objects
✓ Essential for large environments