The sketch that follows your mouse
Add a draw loop and your shapes redraw every instant; tie them to the mouse and the art chases your cursor. Code lets a picture move and react to you.
Frames and input
A repeating draw loop updates visuals over time for animation. Mouse and key input make the art interactive.