xxxxxxxxxx
24
function setup() {
let canvas = createCanvas(600, 600);
}
function draw() {
background(255);
fill(150,40,40)
circle(mouseX,mouseY,60);
for (let i=0; i<=width; i+=40) {
line(i,0,width-i,height);
}
for (let j = 30; j < height; j += 30) {
line(0, j, width, height - j);
}
if (mouseX > 300 && mouseY > 300)
stroke('blue');
else if (mouseX > 300 && mouseY < 300)
stroke('red');
else if (mouseX < 300 && mouseY > 300)
stroke('yellow');
else if (mouseX < 300 && mouseY < 300)
stroke('green');
}