Command Palette

Search for a command to run...

Hectal
Phase 19: Interviews and Capstone
3D Web · Exercise 3 of 4 PreviousNext
Advanced

Plug the leak

Each call of pick(colour) creates a new swatch texture and never frees the old one.

Change pick() so the GPU never holds more than one swatch texture.

What Check tests

  1. Ten more clicks add no textures on the GPU
  2. The swatch shows the last colour picked

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.