xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
frameRate(40);
noStroke();
var x;
}
function draw() {
drawTarget(mouseX + random(-10,10), mouseY+random(-10,10), random(30,200), random(60,100));
}
function drawTarget(xloc, yloc, size, num) {
const grayvalues = 255 / num;
x = random(30,50);
const steps = size / num;
for (let i = 0; i < num; i++) {
fill(i*grayvalues,0,40,x);
ellipse(xloc, yloc, size - i * steps, size - i * steps);
}
}