LOD: three levels, and hysteresis
The triangle counts are for these exact spheres. The bike's own LOD choices come in Topic 19.3.
The cheapest triangle is the one you never send. Frustum culling skips what the camera cannot see; LOD swaps in simpler meshes as objects get far away. Both depend on numbers you must keep true.
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.
Add a fourth level to the LOD example: a billboard PlaneGeometry shown beyond 60 m. What do the triangles read at 80 m?
A tree sits at 8 m behind a house, inside the camera's view. Is it drawn?
Explain it without notes
A mesh with a custom vertex shader disappears when you pan the camera so that its original position leaves the screen. Why, and what are the fixes?
Does three.js avoid drawing an object hidden behind another? Explain.
Console
Nothing logged yet.Expected console output
camera at 3 m -> level 0 | triangles drawn: 3968
camera at 9 m -> level 0 | triangles drawn: 3968
camera at 11 m -> level 1 | triangles drawn: 224
camera at 29 m -> level 1 | triangles drawn: 224
camera at 31 m -> level 2 | triangles drawn: 36
camera at 80 m -> level 2 | triangles drawn: 36
hovering round 10 m with 10% hysteresis: 0 1 1 1 1
the same path with no hysteresis: 0 1 0 1 0