I’m migrating from p5js to processing and something from p5js that works really well its just getting stuck in processing. I’m trying to:
• Define a PImage array
• Load a set of images that are named 0.jpg ~ 11.jpg
• Use a For Loop together with Nf() to abbreviate the loadImage command by using the [i] with the Nf() formatting to take 0 to 0000.jpg etc.
This works great in p5js. Java is not yet my friend.
Here is my code:
PImage[] frontImgs = new PImage[12];
String[] formatOurJPG;
void setup() {
size(1024, 600);
for(int i =0; i < 12; i++) {
formatOurJPG[i] = (nf(i,3));
frontImgs[i] = loadImage("front__" + formatOurJPG + ".jpg");
}
}//end setup
I appreciate your help!