xxxxxxxxxx
25
// Nested Loops
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(0);
strokeWeight(4);
stroke(255);
noFill();
for (var x = -100; x <= mouseX+20; x += 50) {
for (var y = -100; y <= 100; y += 50) {
fill(random(255), mouseX/5, random(255));
ellipse(mouseX+x, mouseY+y, 25, 25);
}
}
}