picrate 2.0.1-java → 2.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/.mvn/extensions.xml +1 -1
- data/.mvn/wrapper/MavenWrapperDownloader.java +1 -1
- data/.mvn/wrapper/maven-wrapper.properties +2 -2
- data/CHANGELOG.md +10 -0
- data/README.md +6 -3
- data/Rakefile +2 -1
- data/docs/_includes/footer.html +1 -1
- data/docs/_layouts/post.html +1 -1
- data/docs/_methods/alternative_methods.md +2 -1
- data/docs/_methods/noise_mode.md +88 -0
- data/docs/_posts/2018-05-06-install_jruby.md +3 -3
- data/docs/_posts/2018-11-18-building-gem.md +3 -1
- data/docs/_posts/2020-03-09-auto_install_picrate.md +2 -3
- data/docs/_posts/2020-05-11-getting_started_manjaro.md +20 -8
- data/docs/classes.md +2 -2
- data/docs/editors.md +2 -2
- data/docs/gems.md +3 -3
- data/docs/index.html +1 -1
- data/docs/libraries.md +2 -2
- data/docs/live.md +2 -2
- data/docs/magic.md +2 -2
- data/docs/methods.md +2 -2
- data/docs/modules.md +3 -3
- data/docs/objects.md +2 -2
- data/lib/picrate.rb +2 -1
- data/lib/picrate/app.rb +7 -2
- data/lib/picrate/helper_methods.rb +1 -1
- data/lib/picrate/native_folder.rb +1 -3
- data/lib/picrate/runner.rb +4 -4
- data/lib/picrate/version.rb +1 -1
- data/library/jcomplex/jcomplex.rb +1 -0
- data/library/pdf/pdf.rb +6 -0
- data/mvnw +2 -2
- data/mvnw.cmd +2 -2
- data/picrate.gemspec +3 -2
- data/pom.rb +22 -8
- data/pom.xml +27 -5
- data/src/main/java/monkstone/PicrateLibrary.java +1 -1
- data/src/main/java/monkstone/complex/JComplex.java +252 -0
- data/src/main/java/monkstone/fastmath/DegLutTables.java +111 -0
- data/src/main/java/monkstone/fastmath/Deglut.java +41 -93
- data/src/main/java/monkstone/noise/FastTerrain.java +874 -0
- data/src/main/java/monkstone/noise/Noise.java +90 -0
- data/src/main/java/monkstone/noise/NoiseGenerator.java +75 -0
- data/src/main/java/monkstone/noise/NoiseMode.java +28 -0
- data/src/main/java/monkstone/noise/OpenSimplex2F.java +881 -0
- data/src/main/java/monkstone/noise/OpenSimplex2S.java +1106 -0
- data/src/main/java/monkstone/noise/SmoothTerrain.java +1099 -0
- data/src/main/java/monkstone/vecmath/package-info.java +1 -1
- data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
- data/src/main/java/monkstone/videoevent/package-info.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +22 -23
- data/src/main/java/processing/awt/PImageAWT.java +377 -0
- data/src/main/java/processing/awt/ShimAWT.java +711 -0
- data/src/main/java/processing/core/PApplet.java +14880 -14101
- data/src/main/java/processing/core/PConstants.java +5 -5
- data/src/main/java/processing/core/PFont.java +1 -1
- data/src/main/java/processing/core/PGraphics.java +284 -271
- data/src/main/java/processing/core/PImage.java +1620 -1815
- data/src/main/java/processing/core/PShape.java +18 -18
- data/src/main/java/processing/core/PSurface.java +105 -139
- data/src/main/java/processing/core/PSurfaceNone.java +29 -0
- data/src/main/java/processing/core/PVector.java +23 -23
- data/src/main/java/processing/data/Table.java +4 -4
- data/src/main/java/processing/net/Client.java +13 -13
- data/src/main/java/processing/net/Server.java +5 -5
- data/src/main/java/processing/opengl/PGL.java +649 -3699
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +2503 -2278
- data/src/main/java/processing/opengl/PJOGL.java +374 -1526
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +220 -86
- data/src/main/java/processing/pdf/PGraphicsPDF.java +607 -0
- data/test/deglut_spec_test.rb +2 -2
- data/test/respond_to_test.rb +0 -1
- data/vendors/Rakefile +33 -21
- data/vendors/{picrate_sketches.geany → geany.rb} +32 -7
- metadata +24 -9
- data/src/main/java/monkstone/noise/SimplexNoise.java +0 -465
@@ -61,12 +61,12 @@ import java.util.Map;
|
|
61
61
|
* For the time being, this class and its shape() and loadShape() friends in
|
62
62
|
* PApplet exist as placeholders for more exciting things to come. If you'd like
|
63
63
|
* to work with this class, make a subclass (see how PShapeSVG works) and you
|
64
|
-
* can play with its internal methods all you like
|
64
|
+
* can play with its internal methods all you like.
|
65
65
|
*
|
66
66
|
* <p>
|
67
67
|
* Library developers are encouraged to create PShape objects when loading shape
|
68
68
|
* data, so that they can eventually hook into the bounty that will be the
|
69
|
-
* PShape interface, and the ease of loadShape() and shape()
|
69
|
+
* PShape interface, and the ease of loadShape() and shape().
|
70
70
|
*
|
71
71
|
* @webref shape
|
72
72
|
* @usage Web & Application
|
@@ -171,7 +171,7 @@ public class PShape implements PConstants {
|
|
171
171
|
*
|
172
172
|
* The width of the PShape document.
|
173
173
|
*
|
174
|
-
|
174
|
+
|
175
175
|
*
|
176
176
|
* @webref pshape:field
|
177
177
|
* @usage web_application
|
@@ -184,7 +184,7 @@ public class PShape implements PConstants {
|
|
184
184
|
*
|
185
185
|
* The height of the PShape document.
|
186
186
|
*
|
187
|
-
|
187
|
+
|
188
188
|
*
|
189
189
|
* @webref pshape:field
|
190
190
|
* @usage web_application
|
@@ -597,7 +597,7 @@ public class PShape implements PConstants {
|
|
597
597
|
* SVG file. For instance, this parameter is controlled by showing or hiding
|
598
598
|
* the shape in the layers palette in Adobe Illustrator.
|
599
599
|
*
|
600
|
-
|
600
|
+
|
601
601
|
*
|
602
602
|
* @return
|
603
603
|
* @webref pshape:method
|
@@ -620,7 +620,7 @@ public class PShape implements PConstants {
|
|
620
620
|
* the SVG file. For instance, this parameter is controlled by showing or
|
621
621
|
* hiding the shape in the layers palette in Adobe Illustrator.
|
622
622
|
*
|
623
|
-
|
623
|
+
|
624
624
|
*
|
625
625
|
* @webref pshape:mathod
|
626
626
|
* @usage web_application
|
@@ -639,7 +639,7 @@ public class PShape implements PConstants {
|
|
639
639
|
* Disables the shape's style data and uses Processing's current styles.
|
640
640
|
* Styles include attributes such as colors, stroke weight, and stroke joints.
|
641
641
|
*
|
642
|
-
|
642
|
+
|
643
643
|
* <h3>Advanced</h3>
|
644
644
|
* Overrides this shape's style information and uses PGraphics styles and
|
645
645
|
* colors. Identical to ignoreStyles(true). Also disables styles for all child
|
@@ -664,7 +664,7 @@ public class PShape implements PConstants {
|
|
664
664
|
* Enables the shape's style data and ignores Processing's current styles.
|
665
665
|
* Styles include attributes such as colors, stroke weight, and stroke joints.
|
666
666
|
*
|
667
|
-
|
667
|
+
|
668
668
|
*
|
669
669
|
* @webref pshape:method
|
670
670
|
* @usage web_application
|
@@ -2419,7 +2419,7 @@ public class PShape implements PConstants {
|
|
2419
2419
|
* with the <b>target</b> parameter. The shape is returned as a
|
2420
2420
|
* <b>PShape</b> object, or <b>null</b> is returned if there is an error.
|
2421
2421
|
*
|
2422
|
-
|
2422
|
+
|
2423
2423
|
*
|
2424
2424
|
* @return
|
2425
2425
|
* @webref pshape:method
|
@@ -3025,7 +3025,7 @@ public class PShape implements PConstants {
|
|
3025
3025
|
* created, only the <b>setFill()</b> method can define a new fill value for
|
3026
3026
|
* the <b>PShape</b>.
|
3027
3027
|
*
|
3028
|
-
|
3028
|
+
|
3029
3029
|
*
|
3030
3030
|
* @webref
|
3031
3031
|
* @param fill
|
@@ -3202,7 +3202,7 @@ public class PShape implements PConstants {
|
|
3202
3202
|
* after the shape is created, only the <b>setStroke()</b> method can define a
|
3203
3203
|
* new stroke value for the <b>PShape</b>.
|
3204
3204
|
*
|
3205
|
-
|
3205
|
+
|
3206
3206
|
*
|
3207
3207
|
* @webref
|
3208
3208
|
* @param stroke
|
@@ -3678,7 +3678,7 @@ public class PShape implements PConstants {
|
|
3678
3678
|
* Using this method with the <b>z</b> parameter requires using the P3D
|
3679
3679
|
* parameter in combination with size.
|
3680
3680
|
*
|
3681
|
-
|
3681
|
+
|
3682
3682
|
*
|
3683
3683
|
* @webref pshape:method
|
3684
3684
|
* @usage web_application
|
@@ -3721,7 +3721,7 @@ public class PShape implements PConstants {
|
|
3721
3721
|
* This method requires a 3D renderer. You need to use P3D as a third
|
3722
3722
|
* parameter for the <b>size()</b> function as shown in the example above.
|
3723
3723
|
*
|
3724
|
-
|
3724
|
+
|
3725
3725
|
*
|
3726
3726
|
* @webref pshape:method
|
3727
3727
|
* @usage web_application
|
@@ -3755,7 +3755,7 @@ public class PShape implements PConstants {
|
|
3755
3755
|
* This method requires a 3D renderer. You need to use P3D as a third
|
3756
3756
|
* parameter for the <b>size()</b> function as shown in the example above.
|
3757
3757
|
*
|
3758
|
-
|
3758
|
+
|
3759
3759
|
*
|
3760
3760
|
* @webref pshape:method
|
3761
3761
|
* @usage web_application
|
@@ -3789,7 +3789,7 @@ public class PShape implements PConstants {
|
|
3789
3789
|
* This method requires a 3D renderer. You need to use P3D as a third
|
3790
3790
|
* parameter for the <b>size()</b> function as shown in the example above.
|
3791
3791
|
*
|
3792
|
-
|
3792
|
+
|
3793
3793
|
*
|
3794
3794
|
* @webref pshape:method
|
3795
3795
|
* @usage web_application
|
@@ -3821,7 +3821,7 @@ public class PShape implements PConstants {
|
|
3821
3821
|
* <b>rotate(PI)</b>. This transformation is applied directly to the shape,
|
3822
3822
|
* it's not refreshed each time <b>draw()</b> is run.
|
3823
3823
|
*
|
3824
|
-
|
3824
|
+
|
3825
3825
|
*
|
3826
3826
|
* @webref pshape:method
|
3827
3827
|
* @usage web_application
|
@@ -3875,7 +3875,7 @@ public class PShape implements PConstants {
|
|
3875
3875
|
* Using this method with the <b>z</b> parameter requires using the P3D
|
3876
3876
|
* parameter in combination with size.
|
3877
3877
|
*
|
3878
|
-
|
3878
|
+
|
3879
3879
|
*
|
3880
3880
|
* @webref pshape:method
|
3881
3881
|
* @usage web_application
|
@@ -3917,7 +3917,7 @@ public class PShape implements PConstants {
|
|
3917
3917
|
* Replaces the current matrix of a shape with the identity matrix. The
|
3918
3918
|
* equivalent function in OpenGL is glLoadIdentity().
|
3919
3919
|
*
|
3920
|
-
|
3920
|
+
|
3921
3921
|
*
|
3922
3922
|
* @webref pshape:method
|
3923
3923
|
* @brief Replaces the current matrix of a shape with the identity matrix
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
2
2
|
|
3
|
-
|
3
|
+
/*
|
4
4
|
Part of the Processing project - http://processing.org
|
5
5
|
|
6
6
|
Copyright (c) 2014-15 The Processing Foundation
|
@@ -18,132 +18,113 @@
|
|
18
18
|
Public License along with this library; if not, write to the
|
19
19
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
20
20
|
Boston, MA 02111-1307 USA
|
21
|
-
|
21
|
+
*/
|
22
|
+
|
22
23
|
package processing.core;
|
23
24
|
|
24
|
-
|
25
|
-
*
|
26
|
-
* @author Martin Prout
|
27
|
-
*/
|
28
|
-
public interface PSurface {
|
25
|
+
import java.io.File;
|
29
26
|
|
27
|
+
public interface PSurface {
|
30
28
|
/**
|
31
|
-
* Minimum dimensions for the window holding an applet.
|
29
|
+
* Minimum dimensions for the window holding an applet. This varies between
|
30
|
+
* platforms, Mac OS X 10.3 (confirmed with 10.7 and Java 6) can do any
|
31
|
+
* height but requires at least 128 pixels width. Windows XP has another
|
32
|
+
* set of limitations. And for all I know, Linux probably allows window
|
33
|
+
* sizes to be negative numbers.
|
32
34
|
*/
|
33
|
-
int MIN_WINDOW_WIDTH = 128;
|
35
|
+
static public final int MIN_WINDOW_WIDTH = 128;
|
36
|
+
static public final int MIN_WINDOW_HEIGHT = 128;
|
34
37
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
38
|
+
//public int displayDensity();
|
39
|
+
|
40
|
+
//public int displayDensity(int display);
|
41
|
+
|
42
|
+
//
|
39
43
|
|
40
44
|
// renderer that doesn't draw to the screen
|
41
|
-
|
42
|
-
*
|
43
|
-
* @param sketch
|
44
|
-
*/
|
45
|
-
void initOffscreen(PApplet sketch);
|
45
|
+
public void initOffscreen(PApplet sketch);
|
46
46
|
|
47
47
|
// considering removal in favor of separate Component classes for appropriate renderers
|
48
48
|
// (i.e. for Java2D or a generic Image surface, but not PDF, debatable for GL or FX)
|
49
|
-
//Component initComponent(PApplet sketch);
|
50
|
-
|
51
|
-
//
|
49
|
+
//public Component initComponent(PApplet sketch);
|
50
|
+
|
51
|
+
//public Frame initFrame(PApplet sketch, Color backgroundColor,
|
52
|
+
// public void initFrame(PApplet sketch, int backgroundColor,
|
52
53
|
// int deviceIndex, boolean fullScreen, boolean spanDisplays);
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
public void initFrame(PApplet sketch);
|
55
|
+
|
56
|
+
//
|
57
|
+
|
58
|
+
public PImage loadImage(String path, Object... args);
|
59
|
+
|
60
|
+
//
|
61
|
+
|
62
|
+
public void selectInput(String prompt, String callback,
|
63
|
+
File file, Object callbackObject);
|
64
|
+
|
65
|
+
public void selectOutput(String prompt, String callback,
|
66
|
+
File file, Object callbackObject);
|
67
|
+
|
68
|
+
public void selectFolder(String prompt, String callback,
|
69
|
+
File file, Object callbackObject);
|
70
|
+
|
71
|
+
//
|
58
72
|
|
59
73
|
/**
|
60
|
-
* Get the native window object associated with this drawing surface.
|
61
|
-
*
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
*
|
67
|
-
* @return
|
74
|
+
* Get the native window object associated with this drawing surface.For Java2D, this will be an AWT Frame object.
|
75
|
+
* For OpenGL, the window.
|
76
|
+
The data returned here is subject to the whims of the renderer,
|
77
|
+
and using this method means you're willing to deal with underlying
|
78
|
+
implementation changes and that you won't throw a fit like a toddler
|
79
|
+
if your code breaks sometime in the future.
|
80
|
+
* @return
|
68
81
|
*/
|
69
|
-
Object getNative();
|
82
|
+
public Object getNative();
|
70
83
|
|
71
84
|
//
|
85
|
+
|
72
86
|
// Just call these on an AWT Frame object stored in PApplet.
|
73
87
|
// Silly, but prevents a lot of rewrite and extra methods for little benefit.
|
74
88
|
// However, maybe prevents us from having to document the 'frame' variable?
|
75
|
-
/**
|
76
|
-
* Set the window (and dock, or whatever necessary) title.
|
77
|
-
*
|
78
|
-
* @param title
|
79
|
-
*/
|
80
|
-
void setTitle(String title);
|
81
89
|
|
82
|
-
/**
|
83
|
-
*
|
84
|
-
|
85
|
-
* @param visible
|
86
|
-
*/
|
87
|
-
void setVisible(boolean visible);
|
90
|
+
/** Set the window (and dock, or whatever necessary) title.
|
91
|
+
* @param title */
|
92
|
+
public void setTitle(String title);
|
88
93
|
|
89
|
-
/**
|
90
|
-
*
|
91
|
-
|
92
|
-
* @param resizable
|
93
|
-
*/
|
94
|
-
void setResizable(boolean resizable);
|
94
|
+
/** Show or hide the window.
|
95
|
+
* @param visible */
|
96
|
+
public void setVisible(boolean visible);
|
95
97
|
|
96
|
-
/**
|
97
|
-
*
|
98
|
-
|
99
|
-
* @param always
|
100
|
-
*/
|
101
|
-
void setAlwaysOnTop(boolean always);
|
98
|
+
/** Set true if we want to resize things (default is not resizable)
|
99
|
+
* @param resizable */
|
100
|
+
public void setResizable(boolean resizable);
|
102
101
|
|
103
|
-
/**
|
104
|
-
*
|
105
|
-
|
106
|
-
|
107
|
-
void setIcon(PImage icon);
|
102
|
+
/** Dumb name, but inherited from Frame and no better ideas.
|
103
|
+
* @param always */
|
104
|
+
public void setAlwaysOnTop(boolean always);
|
105
|
+
|
106
|
+
public void setIcon(PImage icon);
|
108
107
|
|
109
108
|
//
|
110
|
-
// void placeWindow(int[] location);
|
111
|
-
/**
|
112
|
-
*
|
113
|
-
* @param location
|
114
|
-
* @param editorLocation
|
115
|
-
*/
|
116
|
-
void placeWindow(int[] location, int[] editorLocation);
|
117
109
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
void placePresent(int stopColor);
|
110
|
+
// public void placeWindow(int[] location);
|
111
|
+
|
112
|
+
public void placeWindow(int[] location, int[] editorLocation);
|
113
|
+
|
114
|
+
//public void placeFullScreen(boolean hideStop);
|
115
|
+
public void placePresent(int stopColor);
|
124
116
|
|
125
117
|
// Sketch is running from the PDE, set up messaging back to the PDE
|
126
|
-
|
127
|
-
*
|
128
|
-
*/
|
129
|
-
void setupExternalMessages();
|
118
|
+
public void setupExternalMessages();
|
130
119
|
|
131
120
|
//
|
121
|
+
|
132
122
|
// sets displayWidth/Height inside PApplet
|
133
|
-
//void checkDisplaySize();
|
134
|
-
/**
|
135
|
-
*
|
136
|
-
* @param x
|
137
|
-
* @param y
|
138
|
-
*/
|
139
|
-
void setLocation(int x, int y);
|
123
|
+
//public void checkDisplaySize();
|
140
124
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
* @param height
|
145
|
-
*/
|
146
|
-
void setSize(int width, int height);
|
125
|
+
public void setLocation(int x, int y);
|
126
|
+
|
127
|
+
public void setSize(int width, int height);
|
147
128
|
|
148
129
|
// /**
|
149
130
|
// * Called by {@link PApplet#createGraphics} to initialize the
|
@@ -154,79 +135,64 @@ public interface PSurface {
|
|
154
135
|
// * @param high
|
155
136
|
// */
|
156
137
|
// create pixel buffer (pulled out for offscreen graphics)
|
157
|
-
//void initImage(PGraphics gr, int wide, int high);
|
138
|
+
//public void initImage(PGraphics gr, int wide, int high);
|
158
139
|
// create pixel buffer, called from allocate() to produce a compatible image for rendering efficiently
|
159
|
-
// void initImage(PGraphics gr);
|
160
|
-
|
140
|
+
// public void initImage(PGraphics gr);
|
141
|
+
|
142
|
+
//public Component getComponent();
|
143
|
+
|
161
144
|
// /**
|
162
145
|
// * Sometimes smoothing must be set at the drawing surface level
|
163
146
|
// * not just inside the renderer itself.
|
164
147
|
// */
|
165
|
-
// void setSmooth(int level);
|
166
|
-
|
167
|
-
|
168
|
-
* @param fps
|
169
|
-
*/
|
170
|
-
void setFrameRate(float fps);
|
148
|
+
// public void setSmooth(int level);
|
149
|
+
|
150
|
+
public void setFrameRate(float fps);
|
171
151
|
|
172
152
|
// // called on the first frame so that the now-visible drawing surface can
|
173
153
|
// // receive key and mouse events
|
174
|
-
// void requestFocus();
|
154
|
+
// public void requestFocus();
|
155
|
+
|
175
156
|
// // finish rendering to the screen (called by PApplet)
|
176
|
-
// void blit();
|
157
|
+
// public void blit();
|
158
|
+
|
177
159
|
//
|
178
|
-
/**
|
179
|
-
*
|
180
|
-
* @param kind
|
181
|
-
*/
|
182
|
-
void setCursor(int kind);
|
183
160
|
|
184
|
-
|
185
|
-
*
|
186
|
-
* @param image
|
187
|
-
* @param hotspotX
|
188
|
-
* @param hotspotY
|
189
|
-
*/
|
190
|
-
void setCursor(PImage image, int hotspotX, int hotspotY);
|
161
|
+
public void setCursor(int kind);
|
191
162
|
|
192
|
-
|
193
|
-
*
|
194
|
-
*/
|
195
|
-
void showCursor();
|
163
|
+
public void setCursor(PImage image, int hotspotX, int hotspotY);
|
196
164
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
void hideCursor();
|
165
|
+
public void showCursor();
|
166
|
+
|
167
|
+
public void hideCursor();
|
201
168
|
|
202
169
|
//
|
170
|
+
|
203
171
|
/**
|
204
|
-
*
|
172
|
+
* @param url the link to open
|
173
|
+
* @return false if unable to find a viable way to open
|
205
174
|
*/
|
206
|
-
|
175
|
+
public boolean openLink(String url);
|
176
|
+
|
177
|
+
//
|
178
|
+
|
179
|
+
/** Start the animation thread */
|
180
|
+
public void startThread();
|
207
181
|
|
208
182
|
/**
|
209
183
|
* On the next trip through the animation thread, things should go sleepy-bye.
|
210
184
|
* Does not pause the thread immediately because that needs to happen on the
|
211
185
|
* animation thread itself, so fires on the next trip through draw().
|
212
186
|
*/
|
213
|
-
void pauseThread();
|
187
|
+
public void pauseThread();
|
214
188
|
|
215
|
-
|
216
|
-
*
|
217
|
-
*/
|
218
|
-
void resumeThread();
|
189
|
+
public void resumeThread();
|
219
190
|
|
220
191
|
/**
|
221
192
|
* Stop the animation thread (set it null)
|
222
|
-
*
|
223
193
|
* @return false if already stopped
|
224
194
|
*/
|
225
|
-
boolean stopThread();
|
195
|
+
public boolean stopThread();
|
226
196
|
|
227
|
-
|
228
|
-
*
|
229
|
-
* @return
|
230
|
-
*/
|
231
|
-
boolean isStopped();
|
197
|
+
public boolean isStopped();
|
232
198
|
}
|