xxxxxxxxxx
30
// let x = 200;
// let y = 20;
// let speed = 0;
let bouncers = [];
let gravity = 0.1;
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
for (let i = 0; i < 50; i++) {
bouncers[i] = new Ball((width-i),100);
}
} //bouncer2 = new Ball(40);
// function mouseDragged(){
// bouncers.push (new Ball(mouseX,mouseY,100));
// }
function draw() {
background(220,70);
fill(0);
for (let i = 0; i < bouncers.length; i++) {
bouncers[i].move();
bouncers[i].show();
bouncers[i].color();
}
}