propane 3.10.0-java → 3.11.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/wrapper/maven-wrapper.properties +1 -1
  3. data/CHANGELOG.md +2 -0
  4. data/README.md +7 -7
  5. data/lib/propane/app.rb +2 -5
  6. data/lib/propane/helper_methods.rb +6 -6
  7. data/lib/propane/version.rb +1 -1
  8. data/lib/{propane-3.10.0.jar → propane-3.11.0.jar} +0 -0
  9. data/pom.rb +6 -6
  10. data/pom.xml +6 -6
  11. data/propane.gemspec +3 -3
  12. data/src/main/java/monkstone/noise/OpenSimplex2F.java +838 -737
  13. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +8 -13
  14. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +14 -28
  15. data/src/main/java/processing/awt/PImageAWT.java +6 -4
  16. data/src/main/java/processing/core/PApplet.java +71 -59
  17. data/src/main/java/processing/core/PImage.java +14 -14
  18. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +13 -13
  19. data/src/main/java/processing/opengl/PShader.java +1 -6
  20. data/src/main/java/processing/opengl/PSurfaceJOGL.java +6 -6
  21. data/{lib/java/processing/opengl → src/main/resources}/cursors/arrow.png +0 -0
  22. data/{lib/java/processing/opengl → src/main/resources}/cursors/cross.png +0 -0
  23. data/{lib/java/processing/opengl → src/main/resources}/cursors/hand.png +0 -0
  24. data/{lib/java/processing/opengl → src/main/resources}/cursors/license.txt +0 -0
  25. data/{lib/java/processing/opengl → src/main/resources}/cursors/move.png +0 -0
  26. data/{lib/java/processing/opengl → src/main/resources}/cursors/text.png +0 -0
  27. data/{lib/java/processing/opengl → src/main/resources}/cursors/wait.png +0 -0
  28. data/{lib/java/processing/opengl → src/main/resources}/shaders/ColorFrag.glsl +0 -0
  29. data/{lib/java/processing/opengl → src/main/resources}/shaders/ColorVert.glsl +0 -0
  30. data/{lib/java/processing/opengl → src/main/resources}/shaders/LightFrag.glsl +0 -0
  31. data/{lib/java/processing/opengl → src/main/resources}/shaders/LightVert.glsl +0 -0
  32. data/{lib/java/processing/opengl → src/main/resources}/shaders/LineFrag.glsl +0 -0
  33. data/{lib/java/processing/opengl → src/main/resources}/shaders/LineVert.glsl +0 -0
  34. data/{lib/java/processing/opengl → src/main/resources}/shaders/MaskFrag.glsl +0 -0
  35. data/{lib/java/processing/opengl → src/main/resources}/shaders/PointFrag.glsl +0 -0
  36. data/{lib/java/processing/opengl → src/main/resources}/shaders/PointVert.glsl +0 -0
  37. data/{lib/java/processing/opengl → src/main/resources}/shaders/TexFrag.glsl +0 -0
  38. data/{lib/java/processing/opengl → src/main/resources}/shaders/TexLightFrag.glsl +0 -0
  39. data/{lib/java/processing/opengl → src/main/resources}/shaders/TexLightVert.glsl +0 -0
  40. data/{lib/java/processing/opengl → src/main/resources}/shaders/TexVert.glsl +0 -0
  41. data/test/test_helper.rb +1 -0
  42. data/vendors/Rakefile +1 -1
  43. metadata +29 -155
  44. data/lib/java/japplemenubar/JAppleMenuBar.java +0 -88
  45. data/lib/java/japplemenubar/libjAppleMenuBar.jnilib +0 -0
  46. data/lib/java/monkstone/ColorUtil.java +0 -127
  47. data/lib/java/monkstone/MathToolModule.java +0 -287
  48. data/lib/java/monkstone/PropaneLibrary.java +0 -46
  49. data/lib/java/monkstone/core/LibraryProxy.java +0 -136
  50. data/lib/java/monkstone/fastmath/DegLutTables.java +0 -111
  51. data/lib/java/monkstone/fastmath/Deglut.java +0 -71
  52. data/lib/java/monkstone/fastmath/package-info.java +0 -6
  53. data/lib/java/monkstone/filechooser/Chooser.java +0 -39
  54. data/lib/java/monkstone/noise/FastTerrain.java +0 -874
  55. data/lib/java/monkstone/noise/Noise.java +0 -90
  56. data/lib/java/monkstone/noise/NoiseGenerator.java +0 -75
  57. data/lib/java/monkstone/noise/NoiseMode.java +0 -28
  58. data/lib/java/monkstone/noise/OpenSimplex2F.java +0 -881
  59. data/lib/java/monkstone/noise/OpenSimplex2S.java +0 -1106
  60. data/lib/java/monkstone/noise/SmoothTerrain.java +0 -1099
  61. data/lib/java/monkstone/slider/CustomHorizontalSlider.java +0 -164
  62. data/lib/java/monkstone/slider/CustomVerticalSlider.java +0 -178
  63. data/lib/java/monkstone/slider/SimpleHorizontalSlider.java +0 -145
  64. data/lib/java/monkstone/slider/SimpleSlider.java +0 -166
  65. data/lib/java/monkstone/slider/SimpleVerticalSlider.java +0 -157
  66. data/lib/java/monkstone/slider/Slider.java +0 -61
  67. data/lib/java/monkstone/slider/SliderBar.java +0 -245
  68. data/lib/java/monkstone/slider/SliderGroup.java +0 -56
  69. data/lib/java/monkstone/slider/WheelHandler.java +0 -35
  70. data/lib/java/monkstone/vecmath/GfxRender.java +0 -86
  71. data/lib/java/monkstone/vecmath/JRender.java +0 -56
  72. data/lib/java/monkstone/vecmath/ShapeRender.java +0 -87
  73. data/lib/java/monkstone/vecmath/package-info.java +0 -20
  74. data/lib/java/monkstone/vecmath/vec2/Vec2.java +0 -802
  75. data/lib/java/monkstone/vecmath/vec2/package-info.java +0 -6
  76. data/lib/java/monkstone/vecmath/vec3/Vec3.java +0 -727
  77. data/lib/java/monkstone/vecmath/vec3/package-info.java +0 -6
  78. data/lib/java/monkstone/videoevent/CaptureEvent.java +0 -27
  79. data/lib/java/monkstone/videoevent/MovieEvent.java +0 -32
  80. data/lib/java/monkstone/videoevent/package-info.java +0 -20
  81. data/lib/java/processing/awt/PGraphicsJava2D.java +0 -3040
  82. data/lib/java/processing/awt/PImageAWT.java +0 -377
  83. data/lib/java/processing/awt/PShapeJava2D.java +0 -387
  84. data/lib/java/processing/awt/PSurfaceAWT.java +0 -1581
  85. data/lib/java/processing/awt/ShimAWT.java +0 -581
  86. data/lib/java/processing/core/PApplet.java +0 -15156
  87. data/lib/java/processing/core/PConstants.java +0 -523
  88. data/lib/java/processing/core/PFont.java +0 -1126
  89. data/lib/java/processing/core/PGraphics.java +0 -8600
  90. data/lib/java/processing/core/PImage.java +0 -3377
  91. data/lib/java/processing/core/PMatrix.java +0 -208
  92. data/lib/java/processing/core/PMatrix2D.java +0 -562
  93. data/lib/java/processing/core/PMatrix3D.java +0 -890
  94. data/lib/java/processing/core/PShape.java +0 -3561
  95. data/lib/java/processing/core/PShapeOBJ.java +0 -483
  96. data/lib/java/processing/core/PShapeSVG.java +0 -2016
  97. data/lib/java/processing/core/PStyle.java +0 -63
  98. data/lib/java/processing/core/PSurface.java +0 -198
  99. data/lib/java/processing/core/PSurfaceNone.java +0 -431
  100. data/lib/java/processing/core/PVector.java +0 -1066
  101. data/lib/java/processing/core/ThinkDifferent.java +0 -115
  102. data/lib/java/processing/data/DoubleDict.java +0 -850
  103. data/lib/java/processing/data/DoubleList.java +0 -928
  104. data/lib/java/processing/data/FloatDict.java +0 -847
  105. data/lib/java/processing/data/FloatList.java +0 -936
  106. data/lib/java/processing/data/IntDict.java +0 -807
  107. data/lib/java/processing/data/IntList.java +0 -936
  108. data/lib/java/processing/data/JSONArray.java +0 -1260
  109. data/lib/java/processing/data/JSONObject.java +0 -2282
  110. data/lib/java/processing/data/JSONTokener.java +0 -435
  111. data/lib/java/processing/data/LongDict.java +0 -802
  112. data/lib/java/processing/data/LongList.java +0 -937
  113. data/lib/java/processing/data/Sort.java +0 -46
  114. data/lib/java/processing/data/StringDict.java +0 -613
  115. data/lib/java/processing/data/StringList.java +0 -800
  116. data/lib/java/processing/data/Table.java +0 -4936
  117. data/lib/java/processing/data/TableRow.java +0 -198
  118. data/lib/java/processing/data/XML.java +0 -1156
  119. data/lib/java/processing/dxf/RawDXF.java +0 -404
  120. data/lib/java/processing/event/Event.java +0 -125
  121. data/lib/java/processing/event/KeyEvent.java +0 -70
  122. data/lib/java/processing/event/MouseEvent.java +0 -114
  123. data/lib/java/processing/event/TouchEvent.java +0 -57
  124. data/lib/java/processing/javafx/PGraphicsFX2D.java +0 -32
  125. data/lib/java/processing/javafx/PSurfaceFX.java +0 -173
  126. data/lib/java/processing/net/Client.java +0 -744
  127. data/lib/java/processing/net/Server.java +0 -388
  128. data/lib/java/processing/opengl/FontTexture.java +0 -378
  129. data/lib/java/processing/opengl/FrameBuffer.java +0 -513
  130. data/lib/java/processing/opengl/LinePath.java +0 -627
  131. data/lib/java/processing/opengl/LineStroker.java +0 -681
  132. data/lib/java/processing/opengl/PGL.java +0 -3483
  133. data/lib/java/processing/opengl/PGraphics2D.java +0 -615
  134. data/lib/java/processing/opengl/PGraphics3D.java +0 -281
  135. data/lib/java/processing/opengl/PGraphicsOpenGL.java +0 -13753
  136. data/lib/java/processing/opengl/PJOGL.java +0 -2008
  137. data/lib/java/processing/opengl/PShader.java +0 -1484
  138. data/lib/java/processing/opengl/PShapeOpenGL.java +0 -5269
  139. data/lib/java/processing/opengl/PSurfaceJOGL.java +0 -1385
  140. data/lib/java/processing/opengl/Texture.java +0 -1696
  141. data/lib/java/processing/opengl/VertexBuffer.java +0 -88
  142. data/lib/java/processing/pdf/PGraphicsPDF.java +0 -581
  143. data/lib/java/processing/svg/PGraphicsSVG.java +0 -378
  144. data/src/main/java/processing/opengl/cursors/arrow.png +0 -0
  145. data/src/main/java/processing/opengl/cursors/cross.png +0 -0
  146. data/src/main/java/processing/opengl/cursors/hand.png +0 -0
  147. data/src/main/java/processing/opengl/cursors/license.txt +0 -27
  148. data/src/main/java/processing/opengl/cursors/move.png +0 -0
  149. data/src/main/java/processing/opengl/cursors/text.png +0 -0
  150. data/src/main/java/processing/opengl/cursors/wait.png +0 -0
  151. data/src/main/java/processing/opengl/shaders/ColorFrag.glsl +0 -32
  152. data/src/main/java/processing/opengl/shaders/ColorVert.glsl +0 -34
  153. data/src/main/java/processing/opengl/shaders/LightFrag.glsl +0 -33
  154. data/src/main/java/processing/opengl/shaders/LightVert.glsl +0 -151
  155. data/src/main/java/processing/opengl/shaders/LineFrag.glsl +0 -32
  156. data/src/main/java/processing/opengl/shaders/LineVert.glsl +0 -100
  157. data/src/main/java/processing/opengl/shaders/MaskFrag.glsl +0 -40
  158. data/src/main/java/processing/opengl/shaders/PointFrag.glsl +0 -32
  159. data/src/main/java/processing/opengl/shaders/PointVert.glsl +0 -56
  160. data/src/main/java/processing/opengl/shaders/TexFrag.glsl +0 -37
  161. data/src/main/java/processing/opengl/shaders/TexLightFrag.glsl +0 -37
  162. data/src/main/java/processing/opengl/shaders/TexLightVert.glsl +0 -157
  163. data/src/main/java/processing/opengl/shaders/TexVert.glsl +0 -38
@@ -1,378 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
1
- These files are based on the DMZ Cursors package,
2
- used with permission from Jakub Steiner <jimmac@gmail.com>
3
- 11 September 2015
4
-
5
-
6
- The MIT License (MIT)
7
-
8
- Copyright (c) 2006 Jakub Steiner <jimmac@novell.com>
9
- Copyright (c) 2006 Novell, Inc.
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in
19
- all copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- THE SOFTWARE.
@@ -1,32 +0,0 @@
1
- /*
2
- Part of the Processing project - http://processing.org
3
-
4
- Copyright (c) 2012-15 The Processing Foundation
5
- Copyright (c) 2004-12 Ben Fry and Casey Reas
6
- Copyright (c) 2001-04 Massachusetts Institute of Technology
7
-
8
- This library is free software; you can redistribute it and/or
9
- modify it under the terms of the GNU Lesser General Public
10
- License as published by the Free Software Foundation, version 2.1.
11
-
12
- This library is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- Lesser General Public License for more details.
16
-
17
- You should have received a copy of the GNU Lesser General
18
- Public License along with this library; if not, write to the
19
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
- Boston, MA 02111-1307 USA
21
- */
22
-
23
- #ifdef GL_ES
24
- precision mediump float;
25
- precision mediump int;
26
- #endif
27
-
28
- varying vec4 vertColor;
29
-
30
- void main() {
31
- gl_FragColor = vertColor;
32
- }
@@ -1,34 +0,0 @@
1
- /*
2
- Part of the Processing project - http://processing.org
3
-
4
- Copyright (c) 2012-15 The Processing Foundation
5
- Copyright (c) 2004-12 Ben Fry and Casey Reas
6
- Copyright (c) 2001-04 Massachusetts Institute of Technology
7
-
8
- This library is free software; you can redistribute it and/or
9
- modify it under the terms of the GNU Lesser General Public
10
- License as published by the Free Software Foundation, version 2.1.
11
-
12
- This library is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- Lesser General Public License for more details.
16
-
17
- You should have received a copy of the GNU Lesser General
18
- Public License along with this library; if not, write to the
19
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
- Boston, MA 02111-1307 USA
21
- */
22
-
23
- uniform mat4 transformMatrix;
24
-
25
- attribute vec4 position;
26
- attribute vec4 color;
27
-
28
- varying vec4 vertColor;
29
-
30
- void main() {
31
- gl_Position = transformMatrix * position;
32
-
33
- vertColor = color;
34
- }
@@ -1,33 +0,0 @@
1
- /*
2
- Part of the Processing project - http://processing.org
3
-
4
- Copyright (c) 2012-15 The Processing Foundation
5
- Copyright (c) 2004-12 Ben Fry and Casey Reas
6
- Copyright (c) 2001-04 Massachusetts Institute of Technology
7
-
8
- This library is free software; you can redistribute it and/or
9
- modify it under the terms of the GNU Lesser General Public
10
- License as published by the Free Software Foundation, version 2.1.
11
-
12
- This library is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- Lesser General Public License for more details.
16
-
17
- You should have received a copy of the GNU Lesser General
18
- Public License along with this library; if not, write to the
19
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
- Boston, MA 02111-1307 USA
21
- */
22
-
23
- #ifdef GL_ES
24
- precision mediump float;
25
- precision mediump int;
26
- #endif
27
-
28
- varying vec4 vertColor;
29
- varying vec4 backVertColor;
30
-
31
- void main() {
32
- gl_FragColor = gl_FrontFacing ? vertColor : backVertColor;
33
- }
@@ -1,151 +0,0 @@
1
- /*
2
- Part of the Processing project - http://processing.org
3
-
4
- Copyright (c) 2012-15 The Processing Foundation
5
- Copyright (c) 2004-12 Ben Fry and Casey Reas
6
- Copyright (c) 2001-04 Massachusetts Institute of Technology
7
-
8
- This library is free software; you can redistribute it and/or
9
- modify it under the terms of the GNU Lesser General Public
10
- License as published by the Free Software Foundation, version 2.1.
11
-
12
- This library is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- Lesser General Public License for more details.
16
-
17
- You should have received a copy of the GNU Lesser General
18
- Public License along with this library; if not, write to the
19
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
- Boston, MA 02111-1307 USA
21
- */
22
-
23
- uniform mat4 modelviewMatrix;
24
- uniform mat4 transformMatrix;
25
- uniform mat3 normalMatrix;
26
-
27
- uniform int lightCount;
28
- uniform vec4 lightPosition[8];
29
- uniform vec3 lightNormal[8];
30
- uniform vec3 lightAmbient[8];
31
- uniform vec3 lightDiffuse[8];
32
- uniform vec3 lightSpecular[8];
33
- uniform vec3 lightFalloff[8];
34
- uniform vec2 lightSpot[8];
35
-
36
- attribute vec4 position;
37
- attribute vec4 color;
38
- attribute vec3 normal;
39
-
40
- attribute vec4 ambient;
41
- attribute vec4 specular;
42
- attribute vec4 emissive;
43
- attribute float shininess;
44
-
45
- varying vec4 vertColor;
46
- varying vec4 backVertColor;
47
-
48
- const float zero_float = 0.0;
49
- const float one_float = 1.0;
50
- const vec3 zero_vec3 = vec3(0);
51
-
52
- float falloffFactor(vec3 lightPos, vec3 vertPos, vec3 coeff) {
53
- vec3 lpv = lightPos - vertPos;
54
- vec3 dist = vec3(one_float);
55
- dist.z = dot(lpv, lpv);
56
- dist.y = sqrt(dist.z);
57
- return one_float / dot(dist, coeff);
58
- }
59
-
60
- float spotFactor(vec3 lightPos, vec3 vertPos, vec3 lightNorm, float minCos, float spotExp) {
61
- vec3 lpv = normalize(lightPos - vertPos);
62
- vec3 nln = -one_float * lightNorm;
63
- float spotCos = dot(nln, lpv);
64
- return spotCos <= minCos ? zero_float : pow(spotCos, spotExp);
65
- }
66
-
67
- float lambertFactor(vec3 lightDir, vec3 vecNormal) {
68
- return max(zero_float, dot(lightDir, vecNormal));
69
- }
70
-
71
- float blinnPhongFactor(vec3 lightDir, vec3 vertPos, vec3 vecNormal, float shine) {
72
- vec3 np = normalize(vertPos);
73
- vec3 ldp = normalize(lightDir - np);
74
- return pow(max(zero_float, dot(ldp, vecNormal)), shine);
75
- }
76
-
77
- void main() {
78
- // Vertex in clip coordinates
79
- gl_Position = transformMatrix * position;
80
-
81
- // Vertex in eye coordinates
82
- vec3 ecVertex = vec3(modelviewMatrix * position);
83
-
84
- // Normal vector in eye coordinates
85
- vec3 ecNormal = normalize(normalMatrix * normal);
86
- vec3 ecNormalInv = ecNormal * -one_float;
87
-
88
- // Light calculations
89
- vec3 totalAmbient = vec3(0, 0, 0);
90
-
91
- vec3 totalFrontDiffuse = vec3(0, 0, 0);
92
- vec3 totalFrontSpecular = vec3(0, 0, 0);
93
-
94
- vec3 totalBackDiffuse = vec3(0, 0, 0);
95
- vec3 totalBackSpecular = vec3(0, 0, 0);
96
-
97
- for (int i = 0; i < 8; i++) {
98
- if (lightCount == i) break;
99
-
100
- vec3 lightPos = lightPosition[i].xyz;
101
- bool isDir = lightPosition[i].w < one_float;
102
- float spotCos = lightSpot[i].x;
103
- float spotExp = lightSpot[i].y;
104
-
105
- vec3 lightDir;
106
- float falloff;
107
- float spotf;
108
-
109
- if (isDir) {
110
- falloff = one_float;
111
- lightDir = -one_float * lightNormal[i];
112
- } else {
113
- falloff = falloffFactor(lightPos, ecVertex, lightFalloff[i]);
114
- lightDir = normalize(lightPos - ecVertex);
115
- }
116
-
117
- spotf = spotExp > zero_float ? spotFactor(lightPos, ecVertex, lightNormal[i],
118
- spotCos, spotExp)
119
- : one_float;
120
-
121
- if (any(greaterThan(lightAmbient[i], zero_vec3))) {
122
- totalAmbient += lightAmbient[i] * falloff;
123
- }
124
-
125
- if (any(greaterThan(lightDiffuse[i], zero_vec3))) {
126
- totalFrontDiffuse += lightDiffuse[i] * falloff * spotf *
127
- lambertFactor(lightDir, ecNormal);
128
- totalBackDiffuse += lightDiffuse[i] * falloff * spotf *
129
- lambertFactor(lightDir, ecNormalInv);
130
- }
131
-
132
- if (any(greaterThan(lightSpecular[i], zero_vec3))) {
133
- totalFrontSpecular += lightSpecular[i] * falloff * spotf *
134
- blinnPhongFactor(lightDir, ecVertex, ecNormal, shininess);
135
- totalBackSpecular += lightSpecular[i] * falloff * spotf *
136
- blinnPhongFactor(lightDir, ecVertex, ecNormalInv, shininess);
137
- }
138
- }
139
-
140
- // Calculating final color as result of all lights (plus emissive term).
141
- // Transparency is determined exclusively by the diffuse component.
142
- vertColor = vec4(totalAmbient, 0) * ambient +
143
- vec4(totalFrontDiffuse, 1) * color +
144
- vec4(totalFrontSpecular, 0) * specular +
145
- vec4(emissive.rgb, 0);
146
-
147
- backVertColor = vec4(totalAmbient, 0) * ambient +
148
- vec4(totalBackDiffuse, 1) * color +
149
- vec4(totalBackSpecular, 0) * specular +
150
- vec4(emissive.rgb, 0);
151
- }