xxxxxxxxxx
20
let b = [];
let bubbleAmount = 333;
function setup() {
createCanvas(400, 400);
for (let i = 0; i < bubbleAmount; i++) {
b[i] = new Bubble(random(width), random(height - height/4), 50, 50, height, random(5));
}
}
function draw() {
background(54, 154, 1);
noFill();
for (let i = 0; i < b.length; i++) {
b[i].cycle();
if (b[i].x > width) {
b[i].x = 0
}
}
}