Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 5.7 — Build: The Fork and Showroom Lighting
3D Web · Example 1 of 1

Build: the lit showroom with its fork (the real project files, joined)

The exact code of the four project files below (import and export words removed: local imports cannot run in the preview), plus a few lines of scene, camera and turntable. In the scene tree the bike now holds a fork group.

The showroom gets a key light that casts a real shadow, a soft fill, a tone-mapping setting that keeps Lumen orange true, and its sixth bike part, the fork. The bike now looks like painted metal and sits on its stand instead of floating.

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 5 hands-on exercises with automatic checks.

Practice questions

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

01

Make the stand cast a shadow too, and predict the new draw-call count.

02

Move the key light to (-2, 4, 3). Which line changes, and does the shadow camera box still cover the bike?

Explain it without notes

01

List every change this build makes and the file it is in.

02

Why does the first frame print 22 draw calls when the bike has 10 meshes and the stand has 2?

Build: the lit showroom with its fork (the real project files, joined)
Press Run to see the page.
idle

Console

Nothing logged yet.

Expected console output

bike parts: down-tube, top-tube, seat-tube, chain-stays, seat-stays, fork
fork parts: head-tube, fork-legs
bike: 640 triangles
draw calls in the first frame: 22 (shadow pass included)
shadow map: 1024 x 1024