xxxxxxxxxx
38
let shrink = false;
let circR = 40;
let outlR = 80;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(20);
if (circR <= 0) return;
push();
translate(width/2, height/2);
fill(255);
noStroke();
ellipse(0, 0, circR);
noFill();
drawingContext.setLineDash([outlR/5, outlR/5]);
stroke(255);
strokeWeight(4);
if (outlR > 0) ellipse(0, 0, outlR);
pop();
if (shrink) {
if (outlR+4 < circR) {
circR -=2;
} else {
}
outlR -= 2;
}
}
function mousePressed() {
shrink = true;
}