currently I’m working on an interactive slideshow in p5 which I previously built up in processing. It all works so far but I have some issues on making an easy way to load all the images. I have to say that I have around 50 Images/clips, with mixed named and mixed formats (jpeg, png, mov, gif) but they are all stored in an ‘image’ folder in my p5 sketch (web editor).
in my older processing sketch i just listed all the files as a file directory and load them automatically
File dir = new File(dataPath("images/"));
so thats not working in p5. now my question is:
how do i get access to the content of a folder as a whole? like to store the filenames in an array so that i can loop though the names to load them.
as an example, my sketch structure is like this:
sketch.js index.html style.css images(folder) > abc.jpg > 123.jpg > xyz.jpg > 0000.jpg > ...