xxxxxxxxxx
30
let rainbows = [];
function setup() {
createCanvas(800, 800);
background(0);
colorMode(HSB);
background(0);
y = 100;
x = -100;
for (let counter = 0; counter < 28; counter++) {
if (x + 300 > width) {
y += 100;
x = 100;
} else {
x += 200;
}
rainbows.push(new PiRainbow(x, y));
}
}
function draw() {
for (let x = 0; x < rainbows.length; x++) {
fill(0);
stroke(255);
strokeWeight(1);
circle(rainbows[x].x, rainbows[x].y, 5);
rainbows[x].draw();
}
}