Adding and replacing images


Adding and replacing images is as simple as shoving them into the data folder.

From there, all you have to do is create a variable that holds them. Check out how this works:


If you have a file called "picture.jpg" that you'd like to use in this sketch, you'd first drop it into the sketch's data folder, and create a variable like this:

image_3 = loadImage("picture" + ext)

The variable 'ext' is only here to concatenate ".jpg" to your image, but it's not strictly required. For example, if your file was another format, you could do something like this instead:

image_4 = loadImage("picture.png")
image_5 = loadImage("picture.jpg")

And so on.

You can also simply replace the image strings loaded into variables image_1 and image_2 in order to facilitate the same process :)

Get Image Destroyer

Buy Now$9.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.