Code viewer for World: CORS image demo

var url  = "https://humphryscomputing.com/Images/me.2018.jpg";

 url = "https://oaidalleapiprodscus.blob.core.windows.net/private/org-40iQNGaSEIUpJn6KFvDbuS2H/user-rBCpKLfZtN5HiJzYhSscbj46/img-5EkzvnDBfFkjXQTA78elRY45.png?st=2024-02-25T10%3A26%3A12Z&se=2024-02-25T12%3A26%3A12Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-02-24T19%3A05%3A07Z&ske=2024-02-25T19%3A05%3A07Z&sks=b&skv=2021-08-06&sig=D8QzpGbPEHqgyR6yQECgN6fnDR2EzqA/smTJsZM6L08%3D";

// var curl = "https://corsproxy.io/?" + encodeURIComponent(url);


 var img;

function preload() 
{
 //  img = loadImage ( url );  // fails
   img = loadImage ( AB.cors (url) );  // works
}

 
 
const objectsize    = 200;      // size of object   

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

var angle = 0;                  // rotate angle starts at 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("lightblue");    // background color 
 //   fill("navy");               // paint box with this color 
       texture(img);        	
    
    rotateX(angle);             // set each dimension rotation angle to "angle"
    rotateY(angle);
    rotateZ(angle);
  
    box(objectsize);            // draw a cube of this size 
  
    angle = angle + anglechange ;       // change angle each step to get rotate movement
}