Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 15.6 — Build: Glow and Outline
3D Web · Example 1 of 1

The showroom with the effect chain

The project's changed files joined into one module, because local imports cannot run in the preview, with short stand-ins for the renderer, scene, lights and camera. The pedals are outlined from code, as the picker would do on hover. Look at the status bar: the chain adds draw calls.

The showroom gets an effect chain: the headlight glows (and nothing else does), the part under the pointer gets an outline, and the bike gets its pedals. A button turns the effects off.

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 second #fx-style toggle that lowers the pixel ratio of the chain to 1 (effects.resize with composer.setPixelRatio(1)).

02

Change the headlight's price in panel.js to 55.

Explain it without notes

01

Why does the build keep effects.render and the plain renderer both available?

02

Why is the bloom selective by brightness rather than by layers here?

The showroom with the effect chain
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, front-wheel, rear-wheel, handlebar, crankset, pedals, headlight
effect chain: RenderPass > OutlinePass > UnrealBloomPass > OutputPass
outlined part: pedals
glow round the headlight lens: yes, bloom adds light round the lens