xxxxxxxxxx
34
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
stroke(255);
strokeWeight(4);
noFill();
rectMode(CENTER)
if (mouseX > 300 && mouseY > 300) {
rect(350, 350, 50);
fill(255, 0, 0);
}
if (mouseX < 100 && mouseY > 300) {
rect(50, 350, 50);
fill(0, 255, 0);
}
if (mouseX > 300 && mouseY < 100) {
rect(350, 50, 50);
fill(0, 0, 255);
}
if (mouseX < 100 && mouseY < 100) {
rect(50, 50, 50);
fill(255, 0, 255);
}
circle(200, 200, 100);
}