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
- Ten more clicks add no textures on the GPU
- 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.