The brakes on their own
The real createBrakes(), inlined. The pads switch on and off every 45 frames so you can see the glow.
The showroom gets a Test ride button. Rapier loads only when it is pressed; then the bike rides a track with a ramp, driven by held keys or on-screen buttons, followed by the camera, reset when it falls, with brake pads that glow while braking. The brakes are this phase's part.
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.
Show the current speed in km/h next to the ride buttons.
Add the brakes' price to panel.js as 65 instead of 50.
Explain it without notes
Why does the build load Rapier with import(), and what does end() clean up?
How do keyboard, mouse and touch all drive the same ride?
Console
Nothing logged yet.Expected console output
brakes: 2 calipers, at 0.56, 0.69 and -0.50, 0.68
pad glow released: 0
pad glow braking: 1.5 | one material, so both calipers glow together: true