i have loaded images using p5.js but how to perform transition and movement of images for the duration.i am adding up the code here. i have to create a working animation for blast furnace using images.i have used images as variables
var pic2
var pic3
var pic4
var pic5
let posX=0
let posY=0
let size=200
function preload(){
// pic1=loadImage("blastF1.png")
pic2=loadImage("iron.png");
pic3=loadImage("blast3.jpg");
pic4=loadImage("slag.jpg");
pic5=loadImage("BLAST2.jpg")
}
function setup() {
createCanvas(600, 500);
}
function draw() {
background("grey");
// image(pic1,0,100,100,200)
// image(pic2,posX,posY,size,size-20)
image(pic3,posX,400-posY,200,200)
image(pic5,posX,0,200,300)
//image(pic4,0,0)
if(posX>width||posY>height){
posX=0
posY=0
size=100
}else{
posX+=1
posY+=1
size-=0.15}
}