xxxxxxxxxx
25
function setup() {
createCanvas(300, 300);
background(114);
}
// Using the cursor to draw
// Now use a mouse press to clear the screen
// Clear the screen if the mouse is pressed inside a certain circle
// Combine these to create a primitive painting program
function draw() {
if (mouseIsPressed === true) {
cursor(CROSS);
}
if (mouseIsPressed === true) {
background(color(203, 195, 225));
} else {
background(color("#A65AD8"));
}
}