// Cloned by Moses Crasto on 21 Sep 2023 from World "One Cube World (P5)" by Starter user
// Please leave this clone trail here.
const objectsize = 150; // size of object
const anglechange = 0.03; // how much the rotate angle changes each step
var angle = 60; // rotate angle starts at 0
y = 0
function setup() // "setup" is called once at start of run
{
createCanvas ( ABWorld.fullwidth(), ABWorld.fullheight(), WEBGL );
}
function draw() // "draw" is called every timestep during run
{
// background("white"); // background color
a = random(5, 250);
b = random(5, 250);
c = random(5, 250);
fill("a,b,c"); // paint box with this color
stroke("white")
rotateX(angle); // set each dimension rotation angle to "angle"
rotateY(angle);
rotateZ(angle);
y = y + 0.01
translate(y*5,-y*5,-y*3)
box(objectsize);// draw a cube of this size
translate(100,100,100)
a = random(5, 250);
b = random(5, 250);
c = random(5, 250);
fill("a,b,c");
box(objectsize);
translate(100,100,100)
a = random(5, 250);
b = random(5, 250);
c = random(5, 250);
fill("a,b,c");
box(objectsize);
angle = angle + anglechange ; // change angle each step to get rotate movement
}