xxxxxxxxxx
17
var centroX = 150;
var centroY = 100;
var raio = 25;
function setup() {
createCanvas(300, 300);
}
function draw() {
background(220);
if ( dist(centroX, centroY, mouseX, mouseY) < raio ) {
fill(240);
}
else {
fill(10);
}
ellipse(centroX, centroY, 2*raio, 2*raio);
}