xxxxxxxxxx
30
let x = 100
let y = 100
function setup() {
createCanvas(400, 400);
}
function mousePressed() {
x = mouseX;
y = mouseY;
}
function draw() {
background(220);
// still circle
fill('black');
circle(200, 200, 120);
// moving circle
fill('blue');
noStroke();
circle(x, y, 120);
// text
fill('black')
text("Click to move the blue circle to cover the black circle completely", 30, 25)
}