xxxxxxxxxx
25
let circle1x = 100;
let circle1y = 100;
let circleR = 120;
function setup() {
createCanvas(400, 400);
fill(255);
rectMode(CENTER);
}
function draw() {
background(255);
if ( dist(circle1x,circle1y,mouseX,mouseY) < circleR ){
fill(0);
} else {
fill(255);
}
rect(circle1x,circle1y,circleR,circleR);
ellipse(mouseX,mouseY,circleR,circleR);
}