Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 17.2 — Draw Calls and Instancing
3D Web · Example 3 of 3

The Lumen bike: 25 draw calls, or 7 after join

Both files are in /data/3d/models/. Phase 10 made them with glTF Transform.

Each mesh costs one draw call. When many objects share a shape and a material, InstancedMesh, BatchedMesh or merged geometry send them in one call. The counts prove it.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 4 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

A scene has 300 identical lamp posts and 300 trees from 3 different models, all with one material each. Name the draw-call count if you use plain meshes, and the best arrangement.

02

mergeGeometries returns null. Give two likely causes.

Explain it without notes

01

When would you choose BatchedMesh over InstancedMesh, and what does it cost?

02

Why does a merged mesh draw the same number of triangles as 1000 meshes, but cost less?

The Lumen bike: 25 draw calls, or 7 after join
Press Run to see the page.
idle

Console

Nothing logged yet.

Expected console output

lumen-bike-draco.glb         meshes 23 | InstancedMesh 2 | draw calls 25 | triangles 8168
lumen-bike-draco-joined.glb  meshes  5 | InstancedMesh 2 | draw calls  7 | triangles 8136