xxxxxxxxxx
18
let x;
let y;
function setup() {
createCanvas(400, 400);
x = width / 2;
y = height / 2;
}
function draw() {
background(220);
ellipse(x, y, 40, 40);
if (x < mouseX) x += width / height;
if (x > mouseX) x -= width / height;
if (y < mouseY) y += width / height;
if (y > mouseY) y -= width / height;
}