Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 10.7 — Build: Load the Bike Model
3D Web · Example 1 of 1

The showroom after Phase 10

Every project file of this phase, joined into one (local imports cannot run in the preview). The status appears briefly while the 34 KB file loads.

The showroom now loads the bike from a 34 KB Draco-compressed file, says what it is doing while it loads, offers Try again when it fails, and gives up on a load that hangs. The chain, this phase's part, is added in code to the loaded model.

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

Add a timeout test: set timeout: 1 in the loadModel() call and describe what the visitor sees.

02

Change loader.js so it can also load Meshopt-compressed files.

Explain it without notes

01

Why does main.js create the controls only after the model has loaded?

02

What does the visitor see in each of the four states, and what does the developer see when the load fails?

The showroom after Phase 10
Press Run to see the page.
idle

Console

Nothing logged yet.

Expected console output

loaded: lumen-bike-draco.glb | parts: down-tube, top-tube, seat-tube, chain-stays, seat-stays, fork, front-wheel, rear-wheel, handlebar, crankset, chain