xxxxxxxxxx
33
let state = 0;
function setup() {
createCanvas(400, 400);
}
function mousePressed() {
state = state + 1;
}
function draw() {
background(220);
if (millis() > 5000) {
state = 1;
}
if (state == 0) {
background(255, 0, 0);
} else if (state == 1) {
background(255, 0, 255);
}
}