Code viewer for World: One Cube World (P5) (clone...

// Cloned by Vaidas Buzas on 27 Sep 2022 from World "One Cube World (P5) (clone by Colin Duggan)" by Colin Duggan 
// Please leave this clone trail here.
 

const MUSICFILE = '/uploads/cdugga/stillcornersblacklagoon-Cool.DJ.mp3';
AB.backgroundMusic ( MUSICFILE );

                	// how many boxes to have 


// Cloned by Colin Duggan on 4 Oct 2021 from World "One Cube World (P5)" by Starter user 
// Please leave this clone trail here.
 
 
const objectsize    = 200;      // size of object   

const anglechange   = 0.005;     // how much the rotate angle changes each step 

var angle = 0.1;                  // rotate angle starts at 0  

let interval = 2;
var img;

function preload() 
{
   img = loadImage ( 'uploads/humphrys/wave.jpg' );
   imgB = loadImage('/uploads/aravicl2/whitestar.png')
}


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(220);
    ellipse(50,50,80,80);
   
   
    orbitControl();
    tint(255, 126);
   
    texture(img); 
    
    rotateX(angle);             // set each dimension rotation angle to "angle"
    rotateY(angle);
    rotateZ(angle);
  
  
   
    translate ( 100, 200 );		// get box position i 
    box(objectsize);             
        
    
        
    if(frameCount % (interval * 30) == 0){
    
      box(random(450));     
     }
    
  
    angle = angle + anglechange ;       // change angle each step to get rotate movement
}