xxxxxxxxxx
40
x=400;
y=400;
count=0;
function setup() {
createCanvas(800, 800);
background(220);
noStroke();
frameRate(20);
}
function draw() {
rR = random(100,250);
rG = random(1,250);
rB = random(1,250);
fill(rR,rG,rB);
oddOrEven = (count % 2);
if (oddOrEven == 1) {
rectMode(CORNER);
rect(400,400,y,y);
count=count+1
y=y-10;}
else{
rectMode(RADIUS);
rect(width/2, height/2, x,x);
count=count+1
x=x-10;}
if (y<20) {noLoop();}
rect(400, 400,50,50);
// rect(width/2,height-(height/4),x,x/2);
}