xxxxxxxxxx
29
let x = 300;
let y = 200;
let angle = 90;
let diam = 20;
function setup(){
createCanvas(windowWidth,windowHeight);
background(0);
fill(255);
frameRate(60);
setInterval(()=>{
x =random(width);
y =random(height);
diam = random(2);
angle = random(30);
}, Math.random()*3000)
}
function draw(){
fill(diam*(x/50),x/20,diam*(y/20),5)
noStroke();
stroke(diam*14,10);
circle(x, y, diam);
x += sin(angle)*diam;
y += cos(angle)*diam;
angle+=5;
// diam = diam > 30 ? 0 : diam;
diam++;
}