xxxxxxxxxx
17
let stars = [];
function setup() {
createCanvas(500, 500);
for (let i = 0; i < 1000; i++) {
stars[i] = new Star();
}
}
function draw() {
background(20);
translate(width*0.7, height*0.7);
for (let i = 0; i < 1000; i++) {
stars[i].update();
stars[i].show();
}
}