xxxxxxxxxx
25
// boxes full of screen rotating
function setup() {
createCanvas(400, 400, WEBGL);
}
function draw() {
background(random(100,150));
for (countX = -5; countX < 5; countX = countX + 1) {
for (countY = -5; countY < 5; countY = countY + 1) { makeBox()
}
}
}
function makeBox(){push()
translate(countX*60, countY*60,0);
rotateX(frameCount*0.01);
rotateY(frameCount*0.01);
fill((countX+5),0,(countY+5)*10)
box(50)
pop()}