class Box{
float z = 50;
float dz = 2;
void moveBox()
{
z += dz;
}
void show()
{
lights();
pushMatrix();
translate(130, 220, z);
noStroke();
fill(10, 98, 240);
rotateX(frameCount / 100.0);
rotateY(frameCount / 100.0);
box(40);
popMatrix();
if(z+30 >height || z-30 <0)
{
dz *=-1;
}
}
}