xxxxxxxxxx
37
x = -20;
y = 20;
var oddOrEven;
var shape
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
rectMode(RADIUS);
}
function draw() {
oddOrEven = (frameCount % 2);
if (oddOrEven == 1) {
shape = 5;
} else {
shape = 30;
}
let colorR = random(50, 250);
let colorG = random(50, 250);
let colorB = random(50, 250);
fill(colorR, colorG, colorB);
ellipse(x, y, shape, 30);
y = y + 10;
if (y > height + 20) {
y = -5;
x = x + 32;
}
if (y > width + 20) {
noLoop()
}
}