propane 3.6.0-java → 3.10.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/extensions.xml +1 -1
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +5 -1
  5. data/README.md +6 -13
  6. data/Rakefile +7 -6
  7. data/lib/java/japplemenubar/JAppleMenuBar.java +88 -0
  8. data/lib/java/japplemenubar/libjAppleMenuBar.jnilib +0 -0
  9. data/lib/java/monkstone/ColorUtil.java +127 -0
  10. data/lib/java/monkstone/MathToolModule.java +287 -0
  11. data/lib/java/monkstone/PropaneLibrary.java +46 -0
  12. data/lib/java/monkstone/core/LibraryProxy.java +136 -0
  13. data/lib/java/monkstone/fastmath/DegLutTables.java +111 -0
  14. data/lib/java/monkstone/fastmath/Deglut.java +71 -0
  15. data/lib/java/monkstone/fastmath/package-info.java +6 -0
  16. data/lib/java/monkstone/filechooser/Chooser.java +39 -0
  17. data/lib/java/monkstone/noise/FastTerrain.java +874 -0
  18. data/lib/java/monkstone/noise/Noise.java +90 -0
  19. data/lib/java/monkstone/noise/NoiseGenerator.java +75 -0
  20. data/lib/java/monkstone/noise/NoiseMode.java +28 -0
  21. data/lib/java/monkstone/noise/OpenSimplex2F.java +881 -0
  22. data/lib/java/monkstone/noise/OpenSimplex2S.java +1106 -0
  23. data/lib/java/monkstone/noise/SmoothTerrain.java +1099 -0
  24. data/lib/java/monkstone/slider/CustomHorizontalSlider.java +164 -0
  25. data/lib/java/monkstone/slider/CustomVerticalSlider.java +178 -0
  26. data/lib/java/monkstone/slider/SimpleHorizontalSlider.java +145 -0
  27. data/lib/java/monkstone/slider/SimpleSlider.java +166 -0
  28. data/lib/java/monkstone/slider/SimpleVerticalSlider.java +157 -0
  29. data/lib/java/monkstone/slider/Slider.java +61 -0
  30. data/lib/java/monkstone/slider/SliderBar.java +245 -0
  31. data/lib/java/monkstone/slider/SliderGroup.java +56 -0
  32. data/lib/java/monkstone/slider/WheelHandler.java +35 -0
  33. data/lib/java/monkstone/vecmath/GfxRender.java +86 -0
  34. data/lib/java/monkstone/vecmath/JRender.java +56 -0
  35. data/lib/java/monkstone/vecmath/ShapeRender.java +87 -0
  36. data/lib/java/monkstone/vecmath/package-info.java +20 -0
  37. data/lib/java/monkstone/vecmath/vec2/Vec2.java +802 -0
  38. data/lib/java/monkstone/vecmath/vec2/package-info.java +6 -0
  39. data/lib/java/monkstone/vecmath/vec3/Vec3.java +727 -0
  40. data/lib/java/monkstone/vecmath/vec3/package-info.java +6 -0
  41. data/lib/java/monkstone/videoevent/CaptureEvent.java +27 -0
  42. data/lib/java/monkstone/videoevent/MovieEvent.java +32 -0
  43. data/lib/java/monkstone/videoevent/package-info.java +20 -0
  44. data/lib/java/processing/awt/PGraphicsJava2D.java +3040 -0
  45. data/lib/java/processing/awt/PImageAWT.java +377 -0
  46. data/lib/java/processing/awt/PShapeJava2D.java +387 -0
  47. data/lib/java/processing/awt/PSurfaceAWT.java +1581 -0
  48. data/lib/java/processing/awt/ShimAWT.java +581 -0
  49. data/lib/java/processing/core/PApplet.java +15156 -0
  50. data/lib/java/processing/core/PConstants.java +523 -0
  51. data/lib/java/processing/core/PFont.java +1126 -0
  52. data/lib/java/processing/core/PGraphics.java +8600 -0
  53. data/lib/java/processing/core/PImage.java +3377 -0
  54. data/lib/java/processing/core/PMatrix.java +208 -0
  55. data/lib/java/processing/core/PMatrix2D.java +562 -0
  56. data/lib/java/processing/core/PMatrix3D.java +890 -0
  57. data/lib/java/processing/core/PShape.java +3561 -0
  58. data/lib/java/processing/core/PShapeOBJ.java +483 -0
  59. data/lib/java/processing/core/PShapeSVG.java +2016 -0
  60. data/lib/java/processing/core/PStyle.java +63 -0
  61. data/lib/java/processing/core/PSurface.java +198 -0
  62. data/lib/java/processing/core/PSurfaceNone.java +431 -0
  63. data/lib/java/processing/core/PVector.java +1066 -0
  64. data/lib/java/processing/core/ThinkDifferent.java +115 -0
  65. data/lib/java/processing/data/DoubleDict.java +850 -0
  66. data/lib/java/processing/data/DoubleList.java +928 -0
  67. data/lib/java/processing/data/FloatDict.java +847 -0
  68. data/lib/java/processing/data/FloatList.java +936 -0
  69. data/lib/java/processing/data/IntDict.java +807 -0
  70. data/lib/java/processing/data/IntList.java +936 -0
  71. data/lib/java/processing/data/JSONArray.java +1260 -0
  72. data/lib/java/processing/data/JSONObject.java +2282 -0
  73. data/lib/java/processing/data/JSONTokener.java +435 -0
  74. data/lib/java/processing/data/LongDict.java +802 -0
  75. data/lib/java/processing/data/LongList.java +937 -0
  76. data/lib/java/processing/data/Sort.java +46 -0
  77. data/lib/java/processing/data/StringDict.java +613 -0
  78. data/lib/java/processing/data/StringList.java +800 -0
  79. data/lib/java/processing/data/Table.java +4936 -0
  80. data/lib/java/processing/data/TableRow.java +198 -0
  81. data/lib/java/processing/data/XML.java +1156 -0
  82. data/lib/java/processing/dxf/RawDXF.java +404 -0
  83. data/lib/java/processing/event/Event.java +125 -0
  84. data/lib/java/processing/event/KeyEvent.java +70 -0
  85. data/lib/java/processing/event/MouseEvent.java +114 -0
  86. data/lib/java/processing/event/TouchEvent.java +57 -0
  87. data/lib/java/processing/javafx/PGraphicsFX2D.java +32 -0
  88. data/lib/java/processing/javafx/PSurfaceFX.java +173 -0
  89. data/lib/java/processing/net/Client.java +744 -0
  90. data/lib/java/processing/net/Server.java +388 -0
  91. data/lib/java/processing/opengl/FontTexture.java +378 -0
  92. data/lib/java/processing/opengl/FrameBuffer.java +513 -0
  93. data/lib/java/processing/opengl/LinePath.java +627 -0
  94. data/lib/java/processing/opengl/LineStroker.java +681 -0
  95. data/lib/java/processing/opengl/PGL.java +3483 -0
  96. data/lib/java/processing/opengl/PGraphics2D.java +615 -0
  97. data/lib/java/processing/opengl/PGraphics3D.java +281 -0
  98. data/lib/java/processing/opengl/PGraphicsOpenGL.java +13753 -0
  99. data/lib/java/processing/opengl/PJOGL.java +2008 -0
  100. data/lib/java/processing/opengl/PShader.java +1484 -0
  101. data/lib/java/processing/opengl/PShapeOpenGL.java +5269 -0
  102. data/lib/java/processing/opengl/PSurfaceJOGL.java +1385 -0
  103. data/lib/java/processing/opengl/Texture.java +1696 -0
  104. data/lib/java/processing/opengl/VertexBuffer.java +88 -0
  105. data/lib/java/processing/opengl/cursors/arrow.png +0 -0
  106. data/lib/java/processing/opengl/cursors/cross.png +0 -0
  107. data/lib/java/processing/opengl/cursors/hand.png +0 -0
  108. data/lib/java/processing/opengl/cursors/license.txt +27 -0
  109. data/lib/java/processing/opengl/cursors/move.png +0 -0
  110. data/lib/java/processing/opengl/cursors/text.png +0 -0
  111. data/lib/java/processing/opengl/cursors/wait.png +0 -0
  112. data/lib/java/processing/opengl/shaders/ColorFrag.glsl +32 -0
  113. data/lib/java/processing/opengl/shaders/ColorVert.glsl +34 -0
  114. data/lib/java/processing/opengl/shaders/LightFrag.glsl +33 -0
  115. data/lib/java/processing/opengl/shaders/LightVert.glsl +151 -0
  116. data/lib/java/processing/opengl/shaders/LineFrag.glsl +32 -0
  117. data/lib/java/processing/opengl/shaders/LineVert.glsl +100 -0
  118. data/lib/java/processing/opengl/shaders/MaskFrag.glsl +40 -0
  119. data/lib/java/processing/opengl/shaders/PointFrag.glsl +32 -0
  120. data/lib/java/processing/opengl/shaders/PointVert.glsl +56 -0
  121. data/lib/java/processing/opengl/shaders/TexFrag.glsl +37 -0
  122. data/lib/java/processing/opengl/shaders/TexLightFrag.glsl +37 -0
  123. data/lib/java/processing/opengl/shaders/TexLightVert.glsl +157 -0
  124. data/lib/java/processing/opengl/shaders/TexVert.glsl +38 -0
  125. data/lib/java/processing/pdf/PGraphicsPDF.java +581 -0
  126. data/lib/java/processing/svg/PGraphicsSVG.java +378 -0
  127. data/lib/propane/app.rb +9 -10
  128. data/lib/propane/runner.rb +10 -12
  129. data/lib/propane/version.rb +1 -1
  130. data/library/pdf/pdf.rb +7 -0
  131. data/library/svg/svg.rb +7 -0
  132. data/mvnw +3 -3
  133. data/mvnw.cmd +2 -2
  134. data/pom.rb +30 -3
  135. data/pom.xml +54 -3
  136. data/propane.gemspec +7 -3
  137. data/src/main/java/monkstone/FastNoiseModuleJava.java +127 -0
  138. data/src/main/java/monkstone/MathToolModule.java +30 -30
  139. data/src/main/java/monkstone/PropaneLibrary.java +2 -0
  140. data/src/main/java/monkstone/SmoothNoiseModuleJava.java +127 -0
  141. data/src/main/java/monkstone/fastmath/DegLutTables.java +111 -0
  142. data/src/main/java/monkstone/fastmath/Deglut.java +6 -56
  143. data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
  144. data/src/main/java/monkstone/noise/OpenSimplex2F.java +813 -0
  145. data/src/main/java/monkstone/noise/OpenSimplex2S.java +1138 -0
  146. data/src/main/java/monkstone/slider/WheelHandler.java +1 -1
  147. data/src/main/java/monkstone/vecmath/JRender.java +6 -6
  148. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +20 -19
  149. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +12 -12
  150. data/src/main/java/processing/awt/PGraphicsJava2D.java +11 -3
  151. data/src/main/java/processing/core/PApplet.java +13242 -13374
  152. data/src/main/java/processing/core/PConstants.java +155 -163
  153. data/src/main/java/processing/core/PGraphics.java +118 -111
  154. data/src/main/java/processing/opengl/PJOGL.java +6 -5
  155. data/src/main/java/processing/pdf/PGraphicsPDF.java +581 -0
  156. data/src/main/java/processing/svg/PGraphicsSVG.java +378 -0
  157. data/test/deglut_spec_test.rb +2 -2
  158. data/vendors/Rakefile +1 -1
  159. metadata +146 -17
  160. data/library/simplex_noise/simplex_noise.rb +0 -5
  161. data/src/main/java/monkstone/noise/SimplexNoise.java +0 -436
@@ -0,0 +1,378 @@
1
+ /*
2
+ Part of the Processing project - http://processing.org
3
+
4
+ Copyright (c) 2013-2015 The Processing Foundation
5
+ Copyright (c) 2012 Ben Fry and Casey Reas
6
+
7
+ This library is free software; you can redistribute it and/or
8
+ modify it under the terms of the GNU Lesser General Public
9
+ License version 2.1 as published by the Free Software Foundation.
10
+
11
+ This library is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ Lesser General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Lesser General
17
+ Public License along with this library; if not, write to the
18
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19
+ Boston, MA 02111-1307 USA
20
+ */
21
+ package processing.svg;
22
+
23
+ import java.awt.Dimension;
24
+ import java.io.BufferedWriter;
25
+ import java.io.File;
26
+ import java.io.FileNotFoundException;
27
+ import java.io.FileOutputStream;
28
+ import java.io.IOException;
29
+ import java.io.OutputStream;
30
+ import java.io.OutputStreamWriter;
31
+ import java.io.PrintWriter;
32
+ import java.io.Writer;
33
+ import java.nio.charset.StandardCharsets;
34
+ import java.util.logging.Level;
35
+ import java.util.logging.Logger;
36
+ import org.apache.batik.dom.GenericDOMImplementation;
37
+ import org.apache.batik.svggen.SVGGraphics2D;
38
+ import org.apache.batik.svggen.SVGGraphics2DIOException;
39
+ import org.w3c.dom.DOMImplementation;
40
+ import org.w3c.dom.Document;
41
+ import processing.awt.PGraphicsJava2D;
42
+ import processing.core.PImage;
43
+ import processing.core.PSurface;
44
+ import processing.core.PSurfaceNone;
45
+
46
+ public class PGraphicsSVG extends PGraphicsJava2D {
47
+
48
+ /**
49
+ * File being written, if it's a file.
50
+ */
51
+ protected File file;
52
+ /**
53
+ * OutputStream being written to, if using an OutputStream.
54
+ */
55
+ protected OutputStream output;
56
+
57
+ // protected Writer writer;
58
+ public PGraphicsSVG() {
59
+ }
60
+
61
+ @Override
62
+ public void setPath(String path) {
63
+ this.path = path;
64
+ if (path != null) {
65
+ file = new File(path);
66
+ if (!file.isAbsolute()) {
67
+ file = null;
68
+ }
69
+ }
70
+ if (file == null) {
71
+ throw new RuntimeException("PGraphicsSVG requires an absolute path "
72
+ + "for the location of the output file.");
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Set the library to write to an output stream instead of a file.
78
+ *
79
+ * @param output
80
+ */
81
+ public void setOutput(OutputStream output) {
82
+ this.output = output;
83
+ }
84
+
85
+ @Override
86
+ public PSurface createSurface() {
87
+ return surface = new PSurfaceNone(this);
88
+ }
89
+
90
+ @Override
91
+ protected void defaultSettings() { // ignore
92
+ super.defaultSettings();
93
+ textMode = SHAPE;
94
+ }
95
+
96
+ @Override
97
+ public void beginDraw() {
98
+ DOMImplementation domImpl
99
+ = GenericDOMImplementation.getDOMImplementation();
100
+
101
+ // Create an instance of org.w3c.dom.Document.
102
+ String ns = "http://www.w3.org/2000/svg";
103
+ Document document = domImpl.createDocument(ns, "svg", null);
104
+
105
+ // Create an instance of the SVG Generator.
106
+ g2 = new SVGGraphics2D(document);
107
+ ((SVGGraphics2D) g2).setSVGCanvasSize(new Dimension(width, height));
108
+
109
+ // Done with our work, let's check on defaults and the rest
110
+ //super.beginDraw();
111
+ // Can't call super.beginDraw() because it'll nuke our g2
112
+ checkSettings();
113
+ resetMatrix(); // reset model matrix
114
+ vertexCount = 0;
115
+
116
+ // Also need to push the matrix since the matrix doesn't reset on each run
117
+ // http://dev.processing.org/bugs/show_bug.cgi?id=1227
118
+ pushMatrix();
119
+ }
120
+
121
+ @Override
122
+ public void endDraw() {
123
+ Writer writer;
124
+ // Also need to pop the matrix since the matrix doesn't reset on each run
125
+ // http://dev.processing.org/bugs/show_bug.cgi?id=1227
126
+ popMatrix();
127
+ // Figure out where the output goes. If the sketch is calling setOutput()
128
+ // inside draw(), then that OutputStream will be used, otherwise the
129
+ // path for rendering is expected to have ### inside it so that the frame
130
+ // can be inserted, because SVG doesn't support multiple pages.
131
+ if (output == null) {
132
+ if (path == null) {
133
+ throw new RuntimeException("setOutput() or setPath() must be "
134
+ + "used with the SVG renderer");
135
+ } else {
136
+ // insert the frame number and create intermediate directories
137
+ File save = parent.saveFile(parent.insertFrame(path));
138
+ try {
139
+ output = new FileOutputStream(save);
140
+ } catch (FileNotFoundException e) {
141
+ throw new RuntimeException(e);
142
+ }
143
+ }
144
+ }
145
+ // This needs to be overridden so that the endDraw() from PGraphicsJava2D
146
+ // is not inherited (it calls loadPixels).
147
+ // http://dev.processing.org/bugs/show_bug.cgi?id=1169
148
+ // Finally, stream out SVG to the standard output using UTF-8 encoding.
149
+ boolean useCSS = true; // we want to use CSS style attributes
150
+ writer = new PrintWriter(
151
+ new BufferedWriter(
152
+ new OutputStreamWriter(output, StandardCharsets.UTF_8)
153
+ )
154
+ );
155
+ try {
156
+ ((SVGGraphics2D) g2).stream(writer, useCSS);
157
+ } catch (SVGGraphics2DIOException e) {
158
+ }
159
+ try {
160
+ writer.flush();
161
+ writer.close();
162
+ } catch (IOException e) {
163
+ } finally {
164
+ output = null;
165
+ }
166
+ try {
167
+ writer.close();
168
+ } catch (IOException ex) {
169
+ Logger.getLogger(PGraphicsSVG.class.getName()).log(Level.SEVERE, null, ex);
170
+ }
171
+ }
172
+
173
+ // nothing to be done in dispose(), since essentially disposed on each frame
174
+ @Override
175
+ public void dispose() {
176
+ }
177
+
178
+ /**
179
+ * Don't open a window for this renderer, it won't be used.
180
+ *
181
+ * @return
182
+ */
183
+ @Override
184
+ public boolean displayable() {
185
+ return false;
186
+ }
187
+
188
+ @Override
189
+ public void loadPixels() {
190
+ nope("loadPixels");
191
+ }
192
+
193
+ @Override
194
+ public void updatePixels() {
195
+ nope("updatePixels");
196
+ }
197
+
198
+ @Override
199
+ public void updatePixels(int x, int y, int c, int d) {
200
+ nope("updatePixels");
201
+ }
202
+
203
+ //
204
+ @Override
205
+ public int get(int x, int y) {
206
+ nope("get");
207
+ return 0; // not reached
208
+ }
209
+
210
+ @Override
211
+ public PImage get(int x, int y, int c, int d) {
212
+ nope("get");
213
+ return null; // not reached
214
+ }
215
+
216
+ @Override
217
+ public PImage get() {
218
+ nope("get");
219
+ return null; // not reached
220
+ }
221
+
222
+ @Override
223
+ public void set(int x, int y, int argb) {
224
+ nope("set");
225
+ }
226
+
227
+ @Override
228
+ public void set(int x, int y, PImage image) {
229
+ nope("set");
230
+ }
231
+
232
+ //
233
+ @Override
234
+ public void mask(int alpha[]) {
235
+ nope("mask");
236
+ }
237
+
238
+ @Override
239
+ public void mask(PImage alpha) {
240
+ nope("mask");
241
+ }
242
+
243
+ //
244
+ @Override
245
+ public void filter(int kind) {
246
+ nope("filter");
247
+ }
248
+
249
+ @Override
250
+ public void filter(int kind, float param) {
251
+ nope("filter");
252
+ }
253
+
254
+ //
255
+ @Override
256
+ public void copy(int sx1, int sy1, int sx2, int sy2,
257
+ int dx1, int dy1, int dx2, int dy2) {
258
+ nope("copy");
259
+ }
260
+
261
+ @Override
262
+ public void copy(PImage src,
263
+ int sx1, int sy1, int sx2, int sy2,
264
+ int dx1, int dy1, int dx2, int dy2) {
265
+ nope("copy");
266
+ }
267
+
268
+ //
269
+ public void blend(int sx, int sy, int dx, int dy, int mode) {
270
+ nope("blend");
271
+ }
272
+
273
+ public void blend(PImage src,
274
+ int sx, int sy, int dx, int dy, int mode) {
275
+ nope("blend");
276
+ }
277
+
278
+ @Override
279
+ public void blend(int sx1, int sy1, int sx2, int sy2,
280
+ int dx1, int dy1, int dx2, int dy2, int mode) {
281
+ nope("blend");
282
+ }
283
+
284
+ @Override
285
+ public void blend(PImage src,
286
+ int sx1, int sy1, int sx2, int sy2,
287
+ int dx1, int dy1, int dx2, int dy2, int mode) {
288
+ nope("blend");
289
+ }
290
+
291
+ //
292
+ @Override
293
+ public boolean save(String filename) {
294
+ nope("save");
295
+ return false;
296
+ }
297
+
298
+ //////////////////////////////////////////////////////////////
299
+ // /**
300
+ // * Add a directory that should be searched for font data.
301
+ // * <br/>
302
+ // * On Mac OS X, the following directories are added by default:
303
+ // * <UL>
304
+ // * <LI>/System/Library/Fonts
305
+ // * <LI>/Library/Fonts
306
+ // * <LI>~/Library/Fonts
307
+ // * </UL>
308
+ // * On Windows, all drive letters are searched for WINDOWS\Fonts
309
+ // * or WINNT\Fonts, any that exists is added.
310
+ // * <br/><br/>
311
+ // * On Linux or any other platform, you'll need to add the
312
+ // * directories by hand. (If there are actual standards here that we
313
+ // * can use as a starting point, please file a bug to make a note of it)
314
+ // */
315
+ // public void addFonts(String directory) {
316
+ // mapper.insertDirectory(directory);
317
+ // }
318
+ // /**
319
+ // * Check whether the specified font can be used with the PDF library.
320
+ // * @param name name of the font
321
+ // * @return true if it's ok
322
+ // */
323
+ // protected void checkFont() {
324
+ // Font awtFont = textFont.getFont();
325
+ // if (awtFont == null) { // always need a native font or reference to it
326
+ // throw new RuntimeException("Use createFont() instead of loadFont() " +
327
+ // "when drawing text using the PDF library.");
328
+ // } else if (textMode != SHAPE) {
329
+ // if (textFont.isStream()) {
330
+ // throw new RuntimeException("Use textMode(SHAPE) with PDF when loading " +
331
+ // ".ttf and .otf files with createFont().");
332
+ // } else if (mapper.getAliases().get(textFont.getName()) == null) {
333
+ // //System.out.println("alias for " + name + " = " + mapper.getAliases().get(name));
334
+ //// System.err.println("Use PGraphicsPDF.listFonts() to get a list of " +
335
+ //// "fonts that can be used with PDF.");
336
+ //// throw new RuntimeException("The font “" + textFont.getName() + "” " +
337
+ //// "cannot be used with PDF Export.");
338
+ // if (textFont.getName().equals("Lucida Sans")) {
339
+ // throw new RuntimeException("Use textMode(SHAPE) with the default " +
340
+ // "font when exporting to PDF.");
341
+ // } else {
342
+ // throw new RuntimeException("Use textMode(SHAPE) with " +
343
+ // "“" + textFont.getName() + "” " +
344
+ // "when exporting to PDF.");
345
+ // }
346
+ // }
347
+ // }
348
+ // }
349
+ // /**
350
+ // * List the fonts known to the PDF renderer. This is like PFont.list(),
351
+ // * however not all those fonts are available by default.
352
+ // */
353
+ // static public String[] listFonts() {
354
+ // if (fontList == null) {
355
+ // HashMap<?, ?> map = getMapper().getAliases();
356
+ //// Set entries = map.entrySet();
357
+ //// fontList = new String[entries.size()];
358
+ // fontList = new String[map.size()];
359
+ // int count = 0;
360
+ // for (Object entry : map.entrySet()) {
361
+ // fontList[count++] = (String) ((Map.Entry) entry).getKey();
362
+ // }
363
+ //// Iterator it = entries.iterator();
364
+ //// int count = 0;
365
+ //// while (it.hasNext()) {
366
+ //// Map.Entry entry = (Map.Entry) it.next();
367
+ //// //System.out.println(entry.getKey() + "-->" + entry.getValue());
368
+ //// fontList[count++] = (String) entry.getKey();
369
+ //// }
370
+ // fontList = PApplet.sort(fontList);
371
+ // }
372
+ // return fontList;
373
+ // }
374
+ //////////////////////////////////////////////////////////////
375
+ protected void nope(String function) {
376
+ throw new RuntimeException("No " + function + "() for PGraphicsSVG");
377
+ }
378
+ }
@@ -17,10 +17,10 @@ class DeglutTest < Minitest::Test
17
17
  (-720..720).step(1) do |deg|
18
18
  sine = DegLut.sin(deg)
19
19
  deg_sin = Math.sin(deg * to_radian)
20
- assert_in_delta(sine, deg_sin, 0.000001)
20
+ assert_in_delta(sine, deg_sin, 0.0003)
21
21
  cosine = DegLut.cos(deg)
22
22
  deg_cos = Math.cos(deg * to_radian)
23
- assert_in_delta(cosine, deg_cos, 0.000001)
23
+ assert_in_delta(cosine, deg_cos, 0.0003)
24
24
  end
25
25
  end
26
26
  end
data/vendors/Rakefile CHANGED
@@ -11,7 +11,7 @@ PROCESSING_GITHUB = 'https://github.com/processing'
11
11
  PROPANE_EXAMPLES = 'https://github.com/ruby-processing/propane-examples'
12
12
  VIDEO = 'video.zip'
13
13
  DOWNLOAD = 'releases/download/latest'
14
- EXAMPLES = '2.9'
14
+ EXAMPLES = '3.3'
15
15
  HOME_DIR = ENV['HOME']
16
16
  LIBRARY = File.join(HOME_DIR, '.propane', 'libraries')
17
17
  MAC_OR_LINUX = /linux|mac|darwin/.match?(RbConfig::CONFIG['host_os'])
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propane
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.10.0
5
5
  platform: java
6
6
  authors:
7
7
  - monkstone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-13 00:00:00.000000000 Z
11
+ date: 2021-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.1.0
18
+ version: '0.10'
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 0.1.3
21
+ version: 0.10.5
22
22
  name: jruby-openssl
23
- type: :development
24
23
  prerelease: false
24
+ type: :development
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 0.1.0
29
+ version: '0.10'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.1.3
32
+ version: 0.10.5
33
33
  - !ruby/object:Gem::Dependency
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
@@ -37,8 +37,8 @@ dependencies:
37
37
  - !ruby/object:Gem::Version
38
38
  version: '5.14'
39
39
  name: minitest
40
- type: :development
41
40
  prerelease: false
41
+ type: :development
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
@@ -49,15 +49,15 @@ dependencies:
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: '12.3'
52
+ version: '13.0'
53
53
  name: rake
54
- type: :runtime
55
54
  prerelease: false
55
+ type: :runtime
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '12.3'
60
+ version: '13.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
@@ -68,8 +68,8 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: 1.0.2
70
70
  name: arcball
71
- type: :runtime
72
71
  prerelease: false
72
+ type: :runtime
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
@@ -78,7 +78,7 @@ dependencies:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: 1.0.2
81
- description: " A batteries included version of processing in ruby targetting jdk11.\n"
81
+ description: " A batteries included version of processing in ruby targetting jdk11+.\n"
82
82
  email:
83
83
  - mamba2928@yahoo.co.uk
84
84
  executables:
@@ -107,11 +107,131 @@ files:
107
107
  - lib/gluegen-rt-natives-macosx-universal.jar
108
108
  - lib/gluegen-rt-natives-windows-amd64.jar
109
109
  - lib/gluegen-rt.jar
110
+ - lib/java/japplemenubar/JAppleMenuBar.java
111
+ - lib/java/japplemenubar/libjAppleMenuBar.jnilib
112
+ - lib/java/monkstone/ColorUtil.java
113
+ - lib/java/monkstone/MathToolModule.java
114
+ - lib/java/monkstone/PropaneLibrary.java
115
+ - lib/java/monkstone/core/LibraryProxy.java
116
+ - lib/java/monkstone/fastmath/DegLutTables.java
117
+ - lib/java/monkstone/fastmath/Deglut.java
118
+ - lib/java/monkstone/fastmath/package-info.java
119
+ - lib/java/monkstone/filechooser/Chooser.java
120
+ - lib/java/monkstone/noise/FastTerrain.java
121
+ - lib/java/monkstone/noise/Noise.java
122
+ - lib/java/monkstone/noise/NoiseGenerator.java
123
+ - lib/java/monkstone/noise/NoiseMode.java
124
+ - lib/java/monkstone/noise/OpenSimplex2F.java
125
+ - lib/java/monkstone/noise/OpenSimplex2S.java
126
+ - lib/java/monkstone/noise/SmoothTerrain.java
127
+ - lib/java/monkstone/slider/CustomHorizontalSlider.java
128
+ - lib/java/monkstone/slider/CustomVerticalSlider.java
129
+ - lib/java/monkstone/slider/SimpleHorizontalSlider.java
130
+ - lib/java/monkstone/slider/SimpleSlider.java
131
+ - lib/java/monkstone/slider/SimpleVerticalSlider.java
132
+ - lib/java/monkstone/slider/Slider.java
133
+ - lib/java/monkstone/slider/SliderBar.java
134
+ - lib/java/monkstone/slider/SliderGroup.java
135
+ - lib/java/monkstone/slider/WheelHandler.java
136
+ - lib/java/monkstone/vecmath/GfxRender.java
137
+ - lib/java/monkstone/vecmath/JRender.java
138
+ - lib/java/monkstone/vecmath/ShapeRender.java
139
+ - lib/java/monkstone/vecmath/package-info.java
140
+ - lib/java/monkstone/vecmath/vec2/Vec2.java
141
+ - lib/java/monkstone/vecmath/vec2/package-info.java
142
+ - lib/java/monkstone/vecmath/vec3/Vec3.java
143
+ - lib/java/monkstone/vecmath/vec3/package-info.java
144
+ - lib/java/monkstone/videoevent/CaptureEvent.java
145
+ - lib/java/monkstone/videoevent/MovieEvent.java
146
+ - lib/java/monkstone/videoevent/package-info.java
147
+ - lib/java/processing/awt/PGraphicsJava2D.java
148
+ - lib/java/processing/awt/PImageAWT.java
149
+ - lib/java/processing/awt/PShapeJava2D.java
150
+ - lib/java/processing/awt/PSurfaceAWT.java
151
+ - lib/java/processing/awt/ShimAWT.java
152
+ - lib/java/processing/core/PApplet.java
153
+ - lib/java/processing/core/PConstants.java
154
+ - lib/java/processing/core/PFont.java
155
+ - lib/java/processing/core/PGraphics.java
156
+ - lib/java/processing/core/PImage.java
157
+ - lib/java/processing/core/PMatrix.java
158
+ - lib/java/processing/core/PMatrix2D.java
159
+ - lib/java/processing/core/PMatrix3D.java
160
+ - lib/java/processing/core/PShape.java
161
+ - lib/java/processing/core/PShapeOBJ.java
162
+ - lib/java/processing/core/PShapeSVG.java
163
+ - lib/java/processing/core/PStyle.java
164
+ - lib/java/processing/core/PSurface.java
165
+ - lib/java/processing/core/PSurfaceNone.java
166
+ - lib/java/processing/core/PVector.java
167
+ - lib/java/processing/core/ThinkDifferent.java
168
+ - lib/java/processing/data/DoubleDict.java
169
+ - lib/java/processing/data/DoubleList.java
170
+ - lib/java/processing/data/FloatDict.java
171
+ - lib/java/processing/data/FloatList.java
172
+ - lib/java/processing/data/IntDict.java
173
+ - lib/java/processing/data/IntList.java
174
+ - lib/java/processing/data/JSONArray.java
175
+ - lib/java/processing/data/JSONObject.java
176
+ - lib/java/processing/data/JSONTokener.java
177
+ - lib/java/processing/data/LongDict.java
178
+ - lib/java/processing/data/LongList.java
179
+ - lib/java/processing/data/Sort.java
180
+ - lib/java/processing/data/StringDict.java
181
+ - lib/java/processing/data/StringList.java
182
+ - lib/java/processing/data/Table.java
183
+ - lib/java/processing/data/TableRow.java
184
+ - lib/java/processing/data/XML.java
185
+ - lib/java/processing/dxf/RawDXF.java
186
+ - lib/java/processing/event/Event.java
187
+ - lib/java/processing/event/KeyEvent.java
188
+ - lib/java/processing/event/MouseEvent.java
189
+ - lib/java/processing/event/TouchEvent.java
190
+ - lib/java/processing/javafx/PGraphicsFX2D.java
191
+ - lib/java/processing/javafx/PSurfaceFX.java
192
+ - lib/java/processing/net/Client.java
193
+ - lib/java/processing/net/Server.java
194
+ - lib/java/processing/opengl/FontTexture.java
195
+ - lib/java/processing/opengl/FrameBuffer.java
196
+ - lib/java/processing/opengl/LinePath.java
197
+ - lib/java/processing/opengl/LineStroker.java
198
+ - lib/java/processing/opengl/PGL.java
199
+ - lib/java/processing/opengl/PGraphics2D.java
200
+ - lib/java/processing/opengl/PGraphics3D.java
201
+ - lib/java/processing/opengl/PGraphicsOpenGL.java
202
+ - lib/java/processing/opengl/PJOGL.java
203
+ - lib/java/processing/opengl/PShader.java
204
+ - lib/java/processing/opengl/PShapeOpenGL.java
205
+ - lib/java/processing/opengl/PSurfaceJOGL.java
206
+ - lib/java/processing/opengl/Texture.java
207
+ - lib/java/processing/opengl/VertexBuffer.java
208
+ - lib/java/processing/opengl/cursors/arrow.png
209
+ - lib/java/processing/opengl/cursors/cross.png
210
+ - lib/java/processing/opengl/cursors/hand.png
211
+ - lib/java/processing/opengl/cursors/license.txt
212
+ - lib/java/processing/opengl/cursors/move.png
213
+ - lib/java/processing/opengl/cursors/text.png
214
+ - lib/java/processing/opengl/cursors/wait.png
215
+ - lib/java/processing/opengl/shaders/ColorFrag.glsl
216
+ - lib/java/processing/opengl/shaders/ColorVert.glsl
217
+ - lib/java/processing/opengl/shaders/LightFrag.glsl
218
+ - lib/java/processing/opengl/shaders/LightVert.glsl
219
+ - lib/java/processing/opengl/shaders/LineFrag.glsl
220
+ - lib/java/processing/opengl/shaders/LineVert.glsl
221
+ - lib/java/processing/opengl/shaders/MaskFrag.glsl
222
+ - lib/java/processing/opengl/shaders/PointFrag.glsl
223
+ - lib/java/processing/opengl/shaders/PointVert.glsl
224
+ - lib/java/processing/opengl/shaders/TexFrag.glsl
225
+ - lib/java/processing/opengl/shaders/TexLightFrag.glsl
226
+ - lib/java/processing/opengl/shaders/TexLightVert.glsl
227
+ - lib/java/processing/opengl/shaders/TexVert.glsl
228
+ - lib/java/processing/pdf/PGraphicsPDF.java
229
+ - lib/java/processing/svg/PGraphicsSVG.java
110
230
  - lib/jogl-all-natives-linux-amd64.jar
111
231
  - lib/jogl-all-natives-macosx-universal.jar
112
232
  - lib/jogl-all-natives-windows-amd64.jar
113
233
  - lib/jogl-all.jar
114
- - lib/propane-3.6.0.jar
234
+ - lib/propane-3.10.0.jar
115
235
  - lib/propane.rb
116
236
  - lib/propane/app.rb
117
237
  - lib/propane/creators/sketch_class.rb
@@ -135,8 +255,11 @@ files:
135
255
  - library/library_proxy/README.md
136
256
  - library/library_proxy/library_proxy.rb
137
257
  - library/net/net.rb
138
- - library/simplex_noise/simplex_noise.rb
258
+ - library/pdf/itextpdf-5.5.13.2.jar
259
+ - library/pdf/pdf.rb
139
260
  - library/slider/slider.rb
261
+ - library/svg/batik-all-1.14.jar
262
+ - library/svg/svg.rb
140
263
  - library/vector_utils/vector_utils.rb
141
264
  - library/video_event/video_event.rb
142
265
  - license.txt
@@ -148,13 +271,17 @@ files:
148
271
  - src/main/java/japplemenubar/JAppleMenuBar.java
149
272
  - src/main/java/japplemenubar/libjAppleMenuBar.jnilib
150
273
  - src/main/java/monkstone/ColorUtil.java
274
+ - src/main/java/monkstone/FastNoiseModuleJava.java
151
275
  - src/main/java/monkstone/MathToolModule.java
152
276
  - src/main/java/monkstone/PropaneLibrary.java
277
+ - src/main/java/monkstone/SmoothNoiseModuleJava.java
153
278
  - src/main/java/monkstone/core/LibraryProxy.java
279
+ - src/main/java/monkstone/fastmath/DegLutTables.java
154
280
  - src/main/java/monkstone/fastmath/Deglut.java
155
281
  - src/main/java/monkstone/fastmath/package-info.java
156
282
  - src/main/java/monkstone/filechooser/Chooser.java
157
- - src/main/java/monkstone/noise/SimplexNoise.java
283
+ - src/main/java/monkstone/noise/OpenSimplex2F.java
284
+ - src/main/java/monkstone/noise/OpenSimplex2S.java
158
285
  - src/main/java/monkstone/slider/CustomHorizontalSlider.java
159
286
  - src/main/java/monkstone/slider/CustomVerticalSlider.java
160
287
  - src/main/java/monkstone/slider/SimpleHorizontalSlider.java
@@ -256,6 +383,8 @@ files:
256
383
  - src/main/java/processing/opengl/shaders/TexLightFrag.glsl
257
384
  - src/main/java/processing/opengl/shaders/TexLightVert.glsl
258
385
  - src/main/java/processing/opengl/shaders/TexVert.glsl
386
+ - src/main/java/processing/pdf/PGraphicsPDF.java
387
+ - src/main/java/processing/svg/PGraphicsSVG.java
259
388
  - src/main/resources/icon/icon-1024.png
260
389
  - src/main/resources/icon/icon-128.png
261
390
  - src/main/resources/icon/icon-16.png
@@ -297,7 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
426
  version: '0'
298
427
  requirements:
299
428
  - java runtime >= 11.0.2+
300
- rubygems_version: 3.0.6
429
+ rubygems_version: 3.1.6
301
430
  signing_key:
302
431
  specification_version: 4
303
432
  summary: ruby implementation of processing-4.0 on MacOS, linux and windows (64bit