xxxxxxxxxx
27
var x, y, f, s;// height, width, fill, size
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
x = width/2;
y = height/2;
f = 255;
s = 50;
fill(255);
rect(0, 0, 100,100);//top left
rect(300, 0, 100,100);//top right
rect(0, 300, 100,100);//bottom left
rect(300, 300, 100,100);//bottom right
if( mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100){
f = 0; // change fill to light blue
} else if (mouseX > 300 && mouseX < width && mouseY > 0 && mouseY < 100){
s = 100; // increase size
}
fill(f, 255, 255)
ellipse(x, y ,s);//center
}