Problem with delay()

Hello,

It still works fine here in the Processing P5.js mode and with the P5 Editor.
I modified code but it worked with original as well.

let bg1, bg2;

function preload() 
  {
  bg1 = loadImage('giphy.gif');
  bg2 = loadImage('giphy.gif'); 
  }

function setup()
  {
  createCanvas(800, 450);
  //bg1.resize(width / 2, height / 2);
  //bg2.resize(width / 2, height / 2);
  bg1.delay(10);
  bg2.delay(100);
  }

function draw() 
  {
   background(0);
  //translate(width / 2, height / 2);
  image(bg1, 0, 0);
  image(bg2, width/2, 0);
  }


:)

2 Likes