Currently, I only have one onLoad image every time I run the animation.
var imgFish = new Image(); imgFish.onload = init; imgFish.src = 'Image';
I am trying to upload two or more different images at the same time.
I have only one orange fish moving around the canvas when I click on "Add fish!". button. I want to make more different fish swimming on canvas. I created another button called “Add another color fish!”, I want to add a fish, but with a different image with the same code, so that the fish can animate on the canvas.
Does anyone know how I can achieve this?
source share