First add an image using File>New Asset
Next load the image into a variable:
var myDog = loadImage("dog.png");
finally you can display the image using:
image(image_variable, x, y, width, height)
image(myDog, 200, 200, 100, 100);
An Introduction to JavaScript using Objects
Learn the fundamentals of JavaScript by building your own game
Modify the Drawing Objects lesson to create a simple game. Learn how to break ideas into logical steps and programming structures
We will begin our understanding of JavaScript by looking at how to store data in memory
You can use the image function to display any images you have loaded in processing