Skip to content

Commit b7cb429

Browse files
author
Niels Poldervaart
committed
03_A: Compatibility fixes for Processing 3.2.3
1 parent 96ae6af commit b7cb429

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

03_A/Cover/Cover.pde

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Cover.pde
22
// ImageRibbon.pde, Tag.pde
3-
//
3+
//
44
// Generative Gestaltung, ISBN: 978-3-87439-759-9
55
// First Edition, Hermann Schmidt, Mainz, 2009
66
// Hartmut Bohnacker, Benedikt Groß, Julia Laub, Claudius Lazzeroni
@@ -132,7 +132,11 @@ float tagBlockGapRatio = 0.25;
132132

133133

134134
void setup() {
135-
size(1310*qf, 822*qf);
135+
// Default values are:
136+
// width: 1310;
137+
// height: 822;
138+
// Multiply this values by qf to get the correct resolution.
139+
size(1310, 822);
136140
frameRate(4);
137141

138142
smooth();
@@ -310,16 +314,16 @@ void setup() {
310314
// ------ load files ------
311315
imageCount = 0;
312316

313-
File dir = new File(sketchPath, "data/images");
317+
File dir = new File(sketchPath(), "data/images");
314318

315319
if (dir.isDirectory()) {
316320
String[] contents = dir.list();
317-
images = new PImage[contents.length];
321+
images = new PImage[contents.length];
318322
//for (int i = 15 ; i < 60; i++) {
319323
for (int i = 0 ; i < contents.length; i++) {
320324
if (contents[i].charAt(0) == '.') continue;
321325
else if (contents[i].toLowerCase().endsWith(".png") || contents[i].toLowerCase().endsWith(".jpg")) {
322-
File childFile = new File(dir, contents[i]);
326+
File childFile = new File(dir, contents[i]);
323327
images[imageCount] = loadImage(childFile.getPath());
324328
println(imageCount+" - "+contents[i]);
325329
imageCount++;

0 commit comments

Comments
 (0)