xxxxxxxxxx
23
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
// if (mouseX > 200 && mouseX<300) {
// background(255,0,0)
// }
switch (mouseX) {
case 200:
background(255,0,0);
break;
case 100:
background(0,0,255);
break;
default:
background(0,255,0);
}
}