xxxxxxxxxx
28
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
noStroke()
fill(255, 0, 0)
if (mouseX > width*2/3 && mouseX < width){
rect(width*2/3, 0, width/3, height);
}
else if (mouseX > width/3 && mouseX < width*2/3){
rect(width/3, 0, width/3, height);
}
else if (mouseX > 1 && mouseX < width/3) {
rect(0, 0, width/3, height);
}
}