From 3a927a8f51b2a7fc65b5a429946ae7ad94fd8fc7 Mon Sep 17 00:00:00 2001 From: kfrajer Date: Sat, 9 Sep 2017 23:47:35 -0600 Subject: [PATCH] Change size() in setup Manipulating variables to define size() in Processing needs to be done in settings() instead of setup() the function. --- .../MapThing-1.5/examples/MapThing/MapThing.pde | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/distribution/MapThing-1.5/examples/MapThing/MapThing.pde b/distribution/MapThing-1.5/examples/MapThing/MapThing.pde index d16fd94..70dfbec 100644 --- a/distribution/MapThing-1.5/examples/MapThing/MapThing.pde +++ b/distribution/MapThing-1.5/examples/MapThing/MapThing.pde @@ -73,12 +73,14 @@ protected float mDifY = 0f; protected boolean mLocked = false; protected boolean kLocked = false; +void settings() { + int d = 1200; + size(d, envelope.heightFromWidth(d)); +} + void setup() { - colorMode(HSB,360,100,100); - - int d = 1200; - size(d,envelope.heightFromWidth(d)); + colorMode(HSB,360,100,100); transport = loadImage(dataPath("Airport.png")); @@ -317,4 +319,4 @@ void keyPressed() { } else if (key == 'q') { exit(); } -} \ No newline at end of file +}