xxxxxxxxxx
33
let snowflakes = [];
let counter = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
background('black')
}
function draw() {
let t = frameCount / 60;
for (let i = 0; i < random(1); i++) {
snowflakes.push(new createSnow());
}
snowflakes.forEach((el,i) => {
el.init(random(i), random(i), random(i))
})
}
class createSnow{
constructor(x, y){
this.x = x
this.y = y
this.r = random(1, 10)
}
init(x,y,r){
circle(x,y,r)
}
}