I just can't find the way to implement the @preload directives with instances of Processing.js
I'm thinking this is something tricky, because I found, for instance, you need to write "p.__frameRate" to print the frame rate instead of just "p.frameRate" ("p" is a processing instance)
Hi, I need a way to load/cache images just when they are needed. My problem:
I can preload a few images with
@pjs preload="...", the common ones for the app, but I have more than 100 images 1500x1500 in size and these are loaded according to user interact. As you can see, I just can't preload that amount of images.
So, if I use
loadImage(<path>) the image may not be ready to use and the sketch get missing parts 'till the image is ready; like using "copy" this must be ready in order to get correct result.
Any idea how to implement a "load" screen and actually know when all images are completely loaded/ready? Would be great a synchronous image loader method but everywhere says it is not possible in processing.js