xxxxxxxxxx
40
let snow = [];
function setup() {
createCanvas(600, 500);
snow = new Snowball();
}
function draw() {
background(220);
tree();
for (let ball of Snowball) {
ball.update();
ball.show();
}
}
function tree() {
triangle(250, 75, 310, 20, 86, 75);
}
class Snowball {
constructor() {
this.x = random(10, 590);
this.y = 0;
this.size = random(20);
}
update() {
}
show() {
noStroke();
fill(255);
ellipse(this.x, this.y, this.size);
}
}