Trails and fading
11
min
Never clear the canvas. Paint a thin veil instead.
Preview renders the module’s sketch live. Drop your lesson video into the player’s Video field to replace it.
Space to play · ← → to seek
( The code )
The line that does the work.
sketch.js
ctx.fillStyle = "rgba(13,13,16,0.06)"
Open the Lab from the player and change the numbers in this line first.

( What it draws ) One render of this module’s sketch.
( Lesson notes )

This lesson is part of
Particles
A looping attractor animation
In this lesson
Never clear the canvas. Paint a thin veil instead. We build it live in about 11 minutes, then you change it in the Lab until it is yours.
Try this after
Change one number at a time and write down what it did. Most of the good surprises in this course come from the third or fourth change, not the first.
( In this module )
Keep going.
← Previous lesson
Attractors
Next lesson →