xxxxxxxxxx
24
let smallSize = 50;
let largeSize = 200;
let currentSize = 0;
let destinationSize = smallSize;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(5);
if (dist(mouseX, mouseY, width/2, height/2) < currentSize/2){
destinationSize = largeSize;
} else {
destinationSize = smallSize;
}
currentSize += (destinationSize - currentSize)*0.1;
circle(width/2, height/2, currentSize);
}