picrate 0.2.0-java → 0.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/Rakefile +10 -2
- data/docs/_posts/2018-06-26-auto_install_picrate.md +15 -0
- data/lib/export.txt +8 -0
- data/lib/picrate/app.rb +4 -4
- data/lib/picrate/version.rb +1 -1
- data/picrate.gemspec +1 -1
- data/pom.rb +1 -1
- data/pom.xml +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +16 -85
- data/src/main/java/processing/awt/PShapeJava2D.java +9 -33
- data/src/main/java/processing/awt/PSurfaceAWT.java +76 -169
- data/src/main/java/processing/core/PApplet.java +14019 -15963
- data/src/main/java/processing/core/PConstants.java +475 -981
- data/src/main/java/processing/core/PFont.java +50 -202
- data/src/main/java/processing/core/PGraphics.java +7330 -8477
- data/src/main/java/processing/core/PImage.java +42 -212
- data/src/main/java/processing/core/PMatrix.java +21 -160
- data/src/main/java/processing/core/PMatrix2D.java +18 -178
- data/src/main/java/processing/core/PMatrix3D.java +48 -324
- data/src/main/java/processing/core/PShape.java +294 -1181
- data/src/main/java/processing/core/PShapeOBJ.java +16 -91
- data/src/main/java/processing/core/PShapeSVG.java +53 -253
- data/src/main/java/processing/core/PStyle.java +34 -179
- data/src/main/java/processing/core/PSurface.java +13 -94
- data/src/main/java/processing/core/PSurfaceNone.java +35 -140
- data/src/main/java/processing/core/PVector.java +10 -87
- data/src/main/java/processing/event/Event.java +86 -69
- data/src/main/java/processing/event/MouseEvent.java +102 -102
- data/src/main/java/processing/opengl/PGL.java +23 -16
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +13 -10
- data/src/main/java/processing/opengl/PJOGL.java +32 -12
- data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +154 -0
- data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +2 -2
- data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +160 -0
- data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +2 -2
- metadata +7 -3
@@ -23,186 +23,41 @@
|
|
23
23
|
|
24
24
|
package processing.core;
|
25
25
|
|
26
|
-
/**
|
27
|
-
*
|
28
|
-
* @author tux
|
29
|
-
*/
|
30
|
-
public class PStyle implements PConstants {
|
31
|
-
|
32
|
-
/**
|
33
|
-
*
|
34
|
-
*/
|
35
|
-
public int imageMode;
|
36
|
-
|
37
|
-
/**
|
38
|
-
*
|
39
|
-
*/
|
40
|
-
public int rectMode;
|
41
|
-
|
42
|
-
/**
|
43
|
-
*
|
44
|
-
*/
|
45
|
-
public int ellipseMode;
|
46
|
-
|
47
|
-
/**
|
48
|
-
*
|
49
|
-
*/
|
50
|
-
public int shapeMode;
|
51
|
-
|
52
|
-
/**
|
53
|
-
*
|
54
|
-
*/
|
55
|
-
public int blendMode;
|
56
|
-
|
57
|
-
/**
|
58
|
-
*
|
59
|
-
*/
|
60
|
-
public int colorMode;
|
61
|
-
|
62
|
-
/**
|
63
|
-
*
|
64
|
-
*/
|
65
|
-
public float colorModeX;
|
66
|
-
|
67
|
-
/**
|
68
|
-
*
|
69
|
-
*/
|
70
|
-
public float colorModeY;
|
71
|
-
|
72
|
-
/**
|
73
|
-
*
|
74
|
-
*/
|
75
|
-
public float colorModeZ;
|
76
|
-
|
77
|
-
/**
|
78
|
-
*
|
79
|
-
*/
|
80
|
-
public float colorModeA;
|
81
|
-
|
82
|
-
/**
|
83
|
-
*
|
84
|
-
*/
|
85
|
-
public boolean tint;
|
86
|
-
|
87
|
-
/**
|
88
|
-
*
|
89
|
-
*/
|
90
|
-
public int tintColor;
|
91
|
-
|
92
|
-
/**
|
93
|
-
*
|
94
|
-
*/
|
95
|
-
public boolean fill;
|
96
|
-
|
97
|
-
/**
|
98
|
-
*
|
99
|
-
*/
|
100
|
-
public int fillColor;
|
101
|
-
|
102
|
-
/**
|
103
|
-
*
|
104
|
-
*/
|
105
|
-
public boolean stroke;
|
106
|
-
|
107
|
-
/**
|
108
|
-
*
|
109
|
-
*/
|
110
|
-
public int strokeColor;
|
111
|
-
|
112
|
-
/**
|
113
|
-
*
|
114
|
-
*/
|
115
|
-
public float strokeWeight;
|
116
26
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
27
|
+
public class PStyle implements PConstants {
|
28
|
+
public int imageMode;
|
29
|
+
public int rectMode;
|
30
|
+
public int ellipseMode;
|
31
|
+
public int shapeMode;
|
32
|
+
|
33
|
+
public int blendMode;
|
34
|
+
|
35
|
+
public int colorMode;
|
36
|
+
public float colorModeX;
|
37
|
+
public float colorModeY;
|
38
|
+
public float colorModeZ;
|
39
|
+
public float colorModeA;
|
40
|
+
|
41
|
+
public boolean tint;
|
42
|
+
public int tintColor;
|
43
|
+
public boolean fill;
|
44
|
+
public int fillColor;
|
45
|
+
public boolean stroke;
|
46
|
+
public int strokeColor;
|
47
|
+
public float strokeWeight;
|
48
|
+
public int strokeCap;
|
49
|
+
public int strokeJoin;
|
126
50
|
|
127
51
|
// TODO these fellas are inconsistent, and may need to go elsewhere
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
/**
|
140
|
-
*
|
141
|
-
*/
|
142
|
-
ambientB;
|
143
|
-
|
144
|
-
/**
|
145
|
-
*
|
146
|
-
*/
|
147
|
-
public float specularR,
|
148
|
-
|
149
|
-
/**
|
150
|
-
*
|
151
|
-
*/
|
152
|
-
specularG,
|
153
|
-
|
154
|
-
/**
|
155
|
-
*
|
156
|
-
*/
|
157
|
-
specularB;
|
158
|
-
|
159
|
-
/**
|
160
|
-
*
|
161
|
-
*/
|
162
|
-
public float emissiveR,
|
163
|
-
|
164
|
-
/**
|
165
|
-
*
|
166
|
-
*/
|
167
|
-
emissiveG,
|
168
|
-
|
169
|
-
/**
|
170
|
-
*
|
171
|
-
*/
|
172
|
-
emissiveB;
|
173
|
-
|
174
|
-
/**
|
175
|
-
*
|
176
|
-
*/
|
177
|
-
public float shininess;
|
178
|
-
|
179
|
-
/**
|
180
|
-
*
|
181
|
-
*/
|
182
|
-
public PFont textFont;
|
183
|
-
|
184
|
-
/**
|
185
|
-
*
|
186
|
-
*/
|
187
|
-
public int textAlign;
|
188
|
-
|
189
|
-
/**
|
190
|
-
*
|
191
|
-
*/
|
192
|
-
public int textAlignY;
|
193
|
-
|
194
|
-
/**
|
195
|
-
*
|
196
|
-
*/
|
197
|
-
public int textMode;
|
198
|
-
|
199
|
-
/**
|
200
|
-
*
|
201
|
-
*/
|
202
|
-
public float textSize;
|
203
|
-
|
204
|
-
/**
|
205
|
-
*
|
206
|
-
*/
|
207
|
-
public float textLeading;
|
52
|
+
public float ambientR, ambientG, ambientB;
|
53
|
+
public float specularR, specularG, specularB;
|
54
|
+
public float emissiveR, emissiveG, emissiveB;
|
55
|
+
public float shininess;
|
56
|
+
|
57
|
+
public PFont textFont;
|
58
|
+
public int textAlign;
|
59
|
+
public int textAlignY;
|
60
|
+
public int textMode;
|
61
|
+
public float textSize;
|
62
|
+
public float textLeading;
|
208
63
|
}
|
@@ -22,10 +22,7 @@
|
|
22
22
|
|
23
23
|
package processing.core;
|
24
24
|
|
25
|
-
|
26
|
-
*
|
27
|
-
* @author tux
|
28
|
-
*/
|
25
|
+
|
29
26
|
public interface PSurface {
|
30
27
|
/**
|
31
28
|
* Minimum dimensions for the window holding an applet. This varies between
|
@@ -35,18 +32,9 @@ public interface PSurface {
|
|
35
32
|
* sizes to be negative numbers.
|
36
33
|
*/
|
37
34
|
static public final int MIN_WINDOW_WIDTH = 128;
|
38
|
-
|
39
|
-
/**
|
40
|
-
*
|
41
|
-
*/
|
42
|
-
static public final int MIN_WINDOW_HEIGHT = 128;
|
35
|
+
static public final int MIN_WINDOW_HEIGHT = 128;
|
43
36
|
|
44
37
|
// renderer that doesn't draw to the screen
|
45
|
-
|
46
|
-
/**
|
47
|
-
*
|
48
|
-
* @param sketch
|
49
|
-
*/
|
50
38
|
public void initOffscreen(PApplet sketch);
|
51
39
|
|
52
40
|
// considering removal in favor of separate Component classes for appropriate renderers
|
@@ -56,11 +44,6 @@ public interface PSurface {
|
|
56
44
|
//public Frame initFrame(PApplet sketch, Color backgroundColor,
|
57
45
|
// public void initFrame(PApplet sketch, int backgroundColor,
|
58
46
|
// int deviceIndex, boolean fullScreen, boolean spanDisplays);
|
59
|
-
|
60
|
-
/**
|
61
|
-
*
|
62
|
-
* @param sketch
|
63
|
-
*/
|
64
47
|
public void initFrame(PApplet sketch);
|
65
48
|
|
66
49
|
/**
|
@@ -70,7 +53,6 @@ public interface PSurface {
|
|
70
53
|
* and using this method means you're willing to deal with underlying
|
71
54
|
* implementation changes and that you won't throw a fit like a toddler
|
72
55
|
* if your code breaks sometime in the future.
|
73
|
-
* @return
|
74
56
|
*/
|
75
57
|
public Object getNative();
|
76
58
|
|
@@ -80,53 +62,30 @@ public interface PSurface {
|
|
80
62
|
// Silly, but prevents a lot of rewrite and extra methods for little benefit.
|
81
63
|
// However, maybe prevents us from having to document the 'frame' variable?
|
82
64
|
|
83
|
-
/** Set the window (and dock, or whatever necessary) title.
|
84
|
-
* @param title */
|
65
|
+
/** Set the window (and dock, or whatever necessary) title. */
|
85
66
|
public void setTitle(String title);
|
86
67
|
|
87
|
-
/** Show or hide the window.
|
88
|
-
* @param visible */
|
68
|
+
/** Show or hide the window. */
|
89
69
|
public void setVisible(boolean visible);
|
90
70
|
|
91
|
-
/** Set true if we want to resize things (default is not resizable)
|
92
|
-
* @param resizable */
|
71
|
+
/** Set true if we want to resize things (default is not resizable) */
|
93
72
|
public void setResizable(boolean resizable);
|
94
73
|
|
95
|
-
/** Dumb name, but inherited from Frame and no better ideas.
|
96
|
-
* @param always */
|
74
|
+
/** Dumb name, but inherited from Frame and no better ideas. */
|
97
75
|
public void setAlwaysOnTop(boolean always);
|
98
76
|
|
99
|
-
|
100
|
-
*
|
101
|
-
* @param icon
|
102
|
-
*/
|
103
|
-
public void setIcon(PImage icon);
|
77
|
+
public void setIcon(PImage icon);
|
104
78
|
|
105
79
|
//
|
106
80
|
|
107
81
|
// public void placeWindow(int[] location);
|
108
82
|
|
109
|
-
/**
|
110
|
-
*
|
111
|
-
* @param location
|
112
|
-
* @param editorLocation
|
113
|
-
*/
|
114
|
-
|
115
83
|
public void placeWindow(int[] location, int[] editorLocation);
|
116
84
|
|
117
85
|
//public void placeFullScreen(boolean hideStop);
|
118
|
-
|
119
|
-
/**
|
120
|
-
*
|
121
|
-
* @param stopColor
|
122
|
-
*/
|
123
86
|
public void placePresent(int stopColor);
|
124
87
|
|
125
88
|
// Sketch is running from the PDE, set up messaging back to the PDE
|
126
|
-
|
127
|
-
/**
|
128
|
-
*
|
129
|
-
*/
|
130
89
|
public void setupExternalMessages();
|
131
90
|
|
132
91
|
//
|
@@ -134,20 +93,9 @@ public interface PSurface {
|
|
134
93
|
// sets displayWidth/Height inside PApplet
|
135
94
|
//public void checkDisplaySize();
|
136
95
|
|
137
|
-
/**
|
138
|
-
*
|
139
|
-
* @param x
|
140
|
-
* @param y
|
141
|
-
*/
|
142
|
-
|
143
96
|
public void setLocation(int x, int y);
|
144
97
|
|
145
|
-
|
146
|
-
*
|
147
|
-
* @param width
|
148
|
-
* @param height
|
149
|
-
*/
|
150
|
-
public void setSize(int width, int height);
|
98
|
+
public void setSize(int width, int height);
|
151
99
|
|
152
100
|
// /**
|
153
101
|
// * Called by {@link PApplet#createGraphics} to initialize the
|
@@ -170,11 +118,6 @@ public interface PSurface {
|
|
170
118
|
// */
|
171
119
|
// public void setSmooth(int level);
|
172
120
|
|
173
|
-
/**
|
174
|
-
*
|
175
|
-
* @param fps
|
176
|
-
*/
|
177
|
-
|
178
121
|
public void setFrameRate(float fps);
|
179
122
|
|
180
123
|
// // called on the first frame so that the now-visible drawing surface can
|
@@ -186,30 +129,13 @@ public interface PSurface {
|
|
186
129
|
|
187
130
|
//
|
188
131
|
|
189
|
-
/**
|
190
|
-
*
|
191
|
-
* @param kind
|
192
|
-
*/
|
193
|
-
|
194
132
|
public void setCursor(int kind);
|
195
133
|
|
196
|
-
|
197
|
-
*
|
198
|
-
* @param image
|
199
|
-
* @param hotspotX
|
200
|
-
* @param hotspotY
|
201
|
-
*/
|
202
|
-
public void setCursor(PImage image, int hotspotX, int hotspotY);
|
134
|
+
public void setCursor(PImage image, int hotspotX, int hotspotY);
|
203
135
|
|
204
|
-
|
205
|
-
*
|
206
|
-
*/
|
207
|
-
public void showCursor();
|
136
|
+
public void showCursor();
|
208
137
|
|
209
|
-
|
210
|
-
*
|
211
|
-
*/
|
212
|
-
public void hideCursor();
|
138
|
+
public void hideCursor();
|
213
139
|
|
214
140
|
//
|
215
141
|
|
@@ -223,10 +149,7 @@ public interface PSurface {
|
|
223
149
|
*/
|
224
150
|
public void pauseThread();
|
225
151
|
|
226
|
-
|
227
|
-
*
|
228
|
-
*/
|
229
|
-
public void resumeThread();
|
152
|
+
public void resumeThread();
|
230
153
|
|
231
154
|
/**
|
232
155
|
* Stop the animation thread (set it null)
|
@@ -234,9 +157,5 @@ public interface PSurface {
|
|
234
157
|
*/
|
235
158
|
public boolean stopThread();
|
236
159
|
|
237
|
-
|
238
|
-
*
|
239
|
-
* @return
|
240
|
-
*/
|
241
|
-
public boolean isStopped();
|
160
|
+
public boolean isStopped();
|
242
161
|
}
|
@@ -28,55 +28,23 @@ package processing.core;
|
|
28
28
|
* class for other drawing surfaces. It includes the standard rendering loop.
|
29
29
|
*/
|
30
30
|
public class PSurfaceNone implements PSurface {
|
31
|
+
protected PApplet sketch;
|
32
|
+
protected PGraphics graphics;
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
protected PApplet sketch;
|
34
|
+
protected Thread thread;
|
35
|
+
protected boolean paused;
|
36
|
+
protected Object pauseObject = new Object();
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
*/
|
40
|
-
protected PGraphics graphics;
|
38
|
+
protected float frameRateTarget = 60;
|
39
|
+
protected long frameRatePeriod = 1000000000L / 60L;
|
41
40
|
|
42
|
-
/**
|
43
|
-
*
|
44
|
-
*/
|
45
|
-
protected Thread thread;
|
46
41
|
|
47
|
-
|
48
|
-
*
|
49
|
-
*/
|
50
|
-
protected boolean paused;
|
51
|
-
|
52
|
-
/**
|
53
|
-
*
|
54
|
-
*/
|
55
|
-
protected Object pauseObject = new Object();
|
56
|
-
|
57
|
-
/**
|
58
|
-
*
|
59
|
-
*/
|
60
|
-
protected float frameRateTarget = 60;
|
61
|
-
|
62
|
-
/**
|
63
|
-
*
|
64
|
-
*/
|
65
|
-
protected long frameRatePeriod = 1000000000L / 60L;
|
66
|
-
|
67
|
-
/**
|
68
|
-
*
|
69
|
-
* @param graphics
|
70
|
-
*/
|
71
|
-
public PSurfaceNone(PGraphics graphics) {
|
42
|
+
public PSurfaceNone(PGraphics graphics) {
|
72
43
|
this.graphics = graphics;
|
73
44
|
}
|
74
45
|
|
75
|
-
|
76
|
-
|
77
|
-
* @param sketch
|
78
|
-
*/
|
79
|
-
@Override
|
46
|
+
|
47
|
+
@Override
|
80
48
|
public void initOffscreen(PApplet sketch) {
|
81
49
|
this.sketch = sketch;
|
82
50
|
|
@@ -88,11 +56,6 @@ public class PSurfaceNone implements PSurface {
|
|
88
56
|
// return null;
|
89
57
|
// }
|
90
58
|
|
91
|
-
/**
|
92
|
-
*
|
93
|
-
* @param sketch
|
94
|
-
*/
|
95
|
-
|
96
59
|
|
97
60
|
@Override
|
98
61
|
public void initFrame(PApplet sketch) {/*, int backgroundColor,
|
@@ -109,57 +72,42 @@ public class PSurfaceNone implements PSurface {
|
|
109
72
|
}
|
110
73
|
|
111
74
|
|
112
|
-
/** Set the window (and dock, or whatever necessary) title.
|
113
|
-
* @param title */
|
75
|
+
/** Set the window (and dock, or whatever necessary) title. */
|
114
76
|
@Override
|
115
77
|
public void setTitle(String title) {
|
116
78
|
// You're in a utopian PSurface implementation where titles don't exist.
|
117
79
|
}
|
118
80
|
|
119
|
-
|
120
|
-
|
121
|
-
* @param image
|
122
|
-
*/
|
123
|
-
@Override
|
81
|
+
|
82
|
+
@Override
|
124
83
|
public void setIcon(PImage image) {
|
125
84
|
// I ain't visible, man.
|
126
85
|
}
|
127
86
|
|
128
87
|
|
129
|
-
/** Show or hide the window.
|
130
|
-
* @param visible */
|
88
|
+
/** Show or hide the window. */
|
131
89
|
@Override
|
132
90
|
public void setVisible(boolean visible) {
|
133
91
|
// I'm always invisible. You can't catch me.
|
134
92
|
}
|
135
93
|
|
136
94
|
|
137
|
-
/** Set true if we want to resize things (default is not resizable)
|
138
|
-
* @param resizable */
|
95
|
+
/** Set true if we want to resize things (default is not resizable) */
|
139
96
|
@Override
|
140
97
|
public void setResizable(boolean resizable) {
|
141
98
|
// I don't need size to know my worth.
|
142
99
|
}
|
143
100
|
|
144
|
-
|
145
|
-
|
146
|
-
* @param location
|
147
|
-
* @param editorLocation
|
148
|
-
*/
|
149
|
-
@Override
|
101
|
+
|
102
|
+
@Override
|
150
103
|
public void placeWindow(int[] location, int[] editorLocation) { }
|
151
104
|
|
152
|
-
|
153
|
-
|
154
|
-
* @param stopColor
|
155
|
-
*/
|
156
|
-
@Override
|
105
|
+
|
106
|
+
@Override
|
157
107
|
public void placePresent(int stopColor) { }
|
158
108
|
|
159
|
-
|
160
|
-
|
161
|
-
*/
|
162
|
-
@Override
|
109
|
+
|
110
|
+
@Override
|
163
111
|
public void setupExternalMessages() { }
|
164
112
|
|
165
113
|
|
@@ -169,24 +117,14 @@ public class PSurfaceNone implements PSurface {
|
|
169
117
|
|
170
118
|
//
|
171
119
|
|
172
|
-
/**
|
173
|
-
*
|
174
|
-
* @param x
|
175
|
-
* @param y
|
176
|
-
*/
|
177
|
-
|
178
120
|
|
179
121
|
@Override
|
180
122
|
public void setLocation(int x, int y) {
|
181
123
|
// I'm everywhere, because I'm nowhere.
|
182
124
|
}
|
183
125
|
|
184
|
-
|
185
|
-
|
186
|
-
* @param wide
|
187
|
-
* @param high
|
188
|
-
*/
|
189
|
-
@Override
|
126
|
+
|
127
|
+
@Override
|
190
128
|
public void setSize(int wide, int high) {
|
191
129
|
if (PApplet.DEBUG) {
|
192
130
|
//System.out.format("frame visible %b, setSize(%d, %d) %n", frame.isVisible(), wide, high);
|
@@ -231,39 +169,17 @@ public class PSurfaceNone implements PSurface {
|
|
231
169
|
// // TODO Auto-generated method stub
|
232
170
|
// }
|
233
171
|
|
234
|
-
/**
|
235
|
-
*
|
236
|
-
* @param kind
|
237
|
-
*/
|
238
|
-
|
239
172
|
public void setCursor(int kind) { }
|
240
173
|
|
241
|
-
|
242
|
-
*
|
243
|
-
* @param image
|
244
|
-
* @param hotspotX
|
245
|
-
* @param hotspotY
|
246
|
-
*/
|
247
|
-
public void setCursor(PImage image, int hotspotX, int hotspotY) { }
|
174
|
+
public void setCursor(PImage image, int hotspotX, int hotspotY) { }
|
248
175
|
|
249
|
-
|
250
|
-
*
|
251
|
-
*/
|
252
|
-
public void showCursor() { }
|
176
|
+
public void showCursor() { }
|
253
177
|
|
254
|
-
|
255
|
-
*
|
256
|
-
*/
|
257
|
-
public void hideCursor() { }
|
178
|
+
public void hideCursor() { }
|
258
179
|
|
259
180
|
|
260
181
|
//
|
261
182
|
|
262
|
-
/**
|
263
|
-
*
|
264
|
-
* @return
|
265
|
-
*/
|
266
|
-
|
267
183
|
|
268
184
|
public Thread createThread() {
|
269
185
|
return new AnimationThread();
|
@@ -289,11 +205,8 @@ public class PSurfaceNone implements PSurface {
|
|
289
205
|
return true;
|
290
206
|
}
|
291
207
|
|
292
|
-
|
293
|
-
|
294
|
-
* @return
|
295
|
-
*/
|
296
|
-
public boolean isStopped() {
|
208
|
+
|
209
|
+
public boolean isStopped() {
|
297
210
|
return thread == null || !thread.isAlive();
|
298
211
|
}
|
299
212
|
|
@@ -306,10 +219,6 @@ public class PSurfaceNone implements PSurface {
|
|
306
219
|
|
307
220
|
|
308
221
|
// halts the animation thread if the pause flag is set
|
309
|
-
|
310
|
-
/**
|
311
|
-
*
|
312
|
-
*/
|
313
222
|
protected void checkPause() {
|
314
223
|
if (paused) {
|
315
224
|
synchronized (pauseObject) {
|
@@ -324,43 +233,29 @@ public class PSurfaceNone implements PSurface {
|
|
324
233
|
// PApplet.debug("done with pause");
|
325
234
|
}
|
326
235
|
|
327
|
-
|
328
|
-
|
329
|
-
*/
|
330
|
-
public void resumeThread() {
|
236
|
+
|
237
|
+
public void resumeThread() {
|
331
238
|
paused = false;
|
332
239
|
synchronized (pauseObject) {
|
333
240
|
pauseObject.notifyAll(); // wake up the animation thread
|
334
241
|
}
|
335
242
|
}
|
336
243
|
|
337
|
-
|
338
|
-
|
339
|
-
* @param fps
|
340
|
-
*/
|
341
|
-
public void setFrameRate(float fps) {
|
244
|
+
|
245
|
+
public void setFrameRate(float fps) {
|
342
246
|
frameRateTarget = fps;
|
343
247
|
frameRatePeriod = (long) (1000000000.0 / frameRateTarget);
|
344
248
|
//g.setFrameRate(fps);
|
345
249
|
}
|
346
250
|
|
347
|
-
/**
|
348
|
-
*
|
349
|
-
*/
|
350
|
-
public class AnimationThread extends Thread {
|
351
251
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
public AnimationThread() {
|
252
|
+
public class AnimationThread extends Thread {
|
253
|
+
|
254
|
+
public AnimationThread() {
|
356
255
|
super("Animation Thread");
|
357
256
|
}
|
358
257
|
|
359
258
|
// broken out so it can be overridden by Danger et al
|
360
|
-
|
361
|
-
/**
|
362
|
-
*
|
363
|
-
*/
|
364
259
|
public void callDraw() {
|
365
260
|
sketch.handleDraw();
|
366
261
|
}
|