Skip to content

Commit 2fa8062

Browse files
committed
move code around
1 parent 9d1c9b1 commit 2fa8062

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

py5_jar/src/main/java/py5/core/Sketch.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,16 @@ public void _resetSyncSketch() {
128128
style(savedStyle);
129129
}
130130

131-
// in case user doesn't call background in setup
132-
background(204);
131+
// reset window settings
132+
frameRate(60);
133+
cursor(ARROW);
134+
noClip();
135+
136+
// reset 3D settings
137+
if (g.is3D()) {
138+
camera();
139+
perspective();
140+
}
133141

134142
// reset shaders and other opengl only stuff
135143
if (g instanceof PGraphicsOpenGL) {
@@ -140,12 +148,6 @@ public void _resetSyncSketch() {
140148
textureWrap(CLAMP);
141149
}
142150

143-
// reset 3D settings
144-
if (g.is3D()) {
145-
camera();
146-
perspective();
147-
}
148-
149151
// reset hints
150152
hint(ENABLE_DEPTH_TEST);
151153
hint(DISABLE_DEPTH_SORT);
@@ -159,16 +161,14 @@ public void _resetSyncSketch() {
159161
hint(DISABLE_KEY_REPEAT);
160162
hint(ENABLE_ASYNC_SAVEFRAME);
161163

164+
// in case user doesn't call background in setup
165+
background(204);
166+
162167
// reset random methods
163168
osNoiseSeed = (long) (Math.random() * Long.MAX_VALUE);
164169
noiseSeed((long) (Math.random() * Long.MAX_VALUE));
165170
noiseDetail(4, 0.5f);
166171

167-
// reset window settings
168-
frameRate(60);
169-
cursor(ARROW);
170-
noClip();
171-
172172
// reset detail settings
173173
sphereDetail(30);
174174
bezierDetail(20);

0 commit comments

Comments
 (0)