xxxxxxxxxx
22
let planets = [];
function setup() {
createCanvas(400, 400, WEBGL);
planets[0] = new Planet(-100, 0, 0, -1, 100);
planets[1] = new Planet(100, 0, 0, 1, 100);
}
function draw() {
//rotateX(PI/2);
lights();
scale(0.5);
background(51);
for (let i = 0; i < 5; i++) {
let universe = planets.slice();
for (let planet of planets) {
planet.update(universe);
planet.show();
}
}
}