xxxxxxxxxx
int maxImages = 9; //total max of images
int imageIndex = 0; // initial image to be displayed
PImage [] images = new PImage[maxImages];
PFont f;
void setup() {
size(1770, 950);
f = loadFont("SportingGrotesque-Bold-48.vlw");
for (int i = 0; i < images.length; i ++) {
images[i] = loadImage("material" + i + ".png");
}
}
void draw() {
pen();
textFont(f, 40);
fill(240, 255, 255);
textAlign(CENTER);
text("THE MATERIALITY OF DIGITAL CULTURE", 435, 910);
textFont(f, 25);
fill(255);
textAlign(CENTER);
text(" Trace + Press Any Key + Trace Again", 1500, 50);
}
void keyPressed() {
image(images[imageIndex], 0, 0);
imageIndex = int(random(images.length));
}
void pen() {
strokeWeight(2);
stroke(0,0,235);
line(pmouseX, pmouseY, mouseX, mouseY);
}
/** references:
http://learningprocessing.com/examples/chp15/example-15-03-ImageArray1?fbclid=IwAR3bF5Wv9gJxGDM2eutVpqpXP9Iz0jjCtHJToFwGgCgtG9UlL63v6ZxdZ2o
http://learningprocessing.com/examples/chp03/example-03-04-continuousline
*/