xxxxxxxxxx
// counter used to determine how much we rotate the 3-d world
var counter = 0;
function setup() {
createCanvas(800, 600, WEBGL);
}
function draw() {
// blank canvas for animation
background('white');
// rotate world
rotateX(counter);
rotateY(counter);
// draw box
box(200, 200, 200);
// increase counter
counter += 0.01;
}