Basics

setup() happens once

draw() happens continuously, “in a loop”. So far we have not done anything that takes advantage of this getting called multiple times. We are doing the same thing everytime so it is not noticeable we are looping. We need something that is varying over time.

background()

2.1 Variables

variable is an entity that stores values

mouseX and mouseY are system variables that contain the current position of the mouse

mousePressed() - we can move background to the mousePressed() to clear out the canvas

Review Example 1