propane 3.1.0.pre-java → 3.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/wrapper/maven-wrapper.properties +1 -0
  3. data/CHANGELOG.md +1 -5
  4. data/README.md +23 -12
  5. data/Rakefile +23 -12
  6. data/lib/propane/helpers/version_error.rb +6 -0
  7. data/lib/propane/runner.rb +12 -0
  8. data/lib/propane/version.rb +1 -1
  9. data/library/slider/slider.rb +1 -1
  10. data/mvnw +234 -0
  11. data/mvnw.cmd +145 -0
  12. data/pom.xml +28 -27
  13. data/propane.gemspec +2 -2
  14. data/src/main/java/japplemenubar/JAppleMenuBar.java +41 -47
  15. data/src/main/java/monkstone/ColorUtil.java +1 -1
  16. data/src/main/java/monkstone/MathToolModule.java +12 -11
  17. data/src/main/java/monkstone/PropaneLibrary.java +9 -10
  18. data/src/main/java/monkstone/core/LibraryProxy.java +124 -113
  19. data/src/main/java/monkstone/fastmath/Deglut.java +86 -89
  20. data/src/main/java/monkstone/filechooser/Chooser.java +7 -13
  21. data/src/main/java/monkstone/noise/SimplexNoise.java +0 -1
  22. data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +4 -4
  23. data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
  24. data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +9 -9
  25. data/src/main/java/monkstone/slider/SimpleSlider.java +0 -9
  26. data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +11 -13
  27. data/src/main/java/monkstone/slider/Slider.java +1 -1
  28. data/src/main/java/monkstone/slider/SliderBar.java +1 -1
  29. data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
  30. data/src/main/java/monkstone/slider/WheelHandler.java +8 -9
  31. data/src/main/java/monkstone/vecmath/AppRender.java +2 -2
  32. data/src/main/java/monkstone/vecmath/ShapeRender.java +2 -2
  33. data/src/main/java/monkstone/vecmath/package-info.java +2 -2
  34. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +2 -2
  35. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
  36. data/src/main/java/monkstone/videoevent/VideoInterface.java +11 -5
  37. data/src/main/java/monkstone/videoevent/package-info.java +2 -2
  38. data/src/main/java/processing/awt/PGraphicsJava2D.java +1742 -2243
  39. data/src/main/java/processing/awt/PShapeJava2D.java +268 -270
  40. data/src/main/java/processing/awt/PSurfaceAWT.java +821 -920
  41. data/src/main/java/processing/core/DesktopHandler.java +94 -0
  42. data/src/main/java/processing/core/PApplet.java +14170 -14082
  43. data/src/main/java/processing/core/PConstants.java +447 -473
  44. data/src/main/java/processing/core/PFont.java +867 -873
  45. data/src/main/java/processing/core/PGraphics.java +7193 -7428
  46. data/src/main/java/processing/core/PImage.java +3051 -3117
  47. data/src/main/java/processing/core/PMatrix.java +159 -172
  48. data/src/main/java/processing/core/PMatrix2D.java +403 -444
  49. data/src/main/java/processing/core/PMatrix3D.java +735 -749
  50. data/src/main/java/processing/core/PShape.java +2651 -2793
  51. data/src/main/java/processing/core/PShapeOBJ.java +415 -422
  52. data/src/main/java/processing/core/PShapeSVG.java +1466 -1475
  53. data/src/main/java/processing/core/PStyle.java +37 -40
  54. data/src/main/java/processing/core/PSurface.java +98 -103
  55. data/src/main/java/processing/core/PSurfaceNone.java +208 -236
  56. data/src/main/java/processing/core/PVector.java +961 -990
  57. data/src/main/java/processing/data/DoubleDict.java +709 -753
  58. data/src/main/java/processing/data/DoubleList.java +695 -748
  59. data/src/main/java/processing/data/FloatDict.java +702 -746
  60. data/src/main/java/processing/data/FloatList.java +697 -751
  61. data/src/main/java/processing/data/IntDict.java +673 -718
  62. data/src/main/java/processing/data/IntList.java +633 -699
  63. data/src/main/java/processing/data/JSONArray.java +873 -931
  64. data/src/main/java/processing/data/JSONObject.java +1165 -1262
  65. data/src/main/java/processing/data/JSONTokener.java +341 -351
  66. data/src/main/java/processing/data/LongDict.java +662 -707
  67. data/src/main/java/processing/data/LongList.java +634 -700
  68. data/src/main/java/processing/data/Sort.java +41 -37
  69. data/src/main/java/processing/data/StringDict.java +486 -522
  70. data/src/main/java/processing/data/StringList.java +580 -624
  71. data/src/main/java/processing/data/Table.java +3508 -3686
  72. data/src/main/java/processing/data/TableRow.java +183 -182
  73. data/src/main/java/processing/data/XML.java +883 -957
  74. data/src/main/java/processing/event/Event.java +66 -87
  75. data/src/main/java/processing/event/KeyEvent.java +41 -48
  76. data/src/main/java/processing/event/MouseEvent.java +93 -103
  77. data/src/main/java/processing/event/TouchEvent.java +6 -10
  78. data/src/main/java/processing/javafx/PGraphicsFX2D.java +5 -69
  79. data/src/main/java/processing/javafx/PSurfaceFX.java +2 -7
  80. data/src/main/java/processing/opengl/FontTexture.java +270 -290
  81. data/src/main/java/processing/opengl/FrameBuffer.java +363 -375
  82. data/src/main/java/processing/opengl/LinePath.java +500 -543
  83. data/src/main/java/processing/opengl/LineStroker.java +582 -593
  84. data/src/main/java/processing/opengl/PGL.java +2881 -2904
  85. data/src/main/java/processing/opengl/PGraphics2D.java +315 -408
  86. data/src/main/java/processing/opengl/PGraphics3D.java +72 -107
  87. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +12043 -12230
  88. data/src/main/java/processing/opengl/PJOGL.java +1681 -1745
  89. data/src/main/java/processing/opengl/PShader.java +1257 -1260
  90. data/src/main/java/processing/opengl/PShapeOpenGL.java +4599 -4662
  91. data/src/main/java/processing/opengl/PSurfaceJOGL.java +1030 -1047
  92. data/src/main/java/processing/opengl/Texture.java +1397 -1462
  93. data/src/main/java/processing/opengl/VertexBuffer.java +55 -57
  94. data/src/main/resources/icon/icon-1024.png +0 -0
  95. data/src/main/resources/icon/icon-128.png +0 -0
  96. data/src/main/resources/icon/icon-16.png +0 -0
  97. data/src/main/resources/icon/icon-256.png +0 -0
  98. data/src/main/resources/icon/icon-32.png +0 -0
  99. data/src/main/resources/icon/icon-48.png +0 -0
  100. data/src/main/resources/icon/icon-512.png +0 -0
  101. data/src/main/resources/icon/icon-64.png +0 -0
  102. data/vendors/Rakefile +1 -1
  103. metadata +12 -8
  104. data/src/main/java/processing/core/ThinkDifferent.java +0 -70
@@ -14,7 +14,6 @@
14
14
  * attribution is appreciated.
15
15
  *
16
16
  */
17
-
18
17
  package monkstone.noise;
19
18
 
20
19
  public class SimplexNoise { // Simplex noise in 2D, 3D and 4D
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-18 Martin Prout
2
+ * Copyright (c) 2016-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -82,7 +82,7 @@ public class CustomHorizontalSlider extends SliderBar {
82
82
  applet.text(String.format(lFormat, (int) vMax), pX + pW, pY - numberSize / 2);
83
83
  }
84
84
  }
85
-
85
+
86
86
  @Override
87
87
  void drawGui() {
88
88
  if (backgroundVisible) {
@@ -91,7 +91,7 @@ public class CustomHorizontalSlider extends SliderBar {
91
91
  }
92
92
  applet.fill(sliderFill);
93
93
  applet.rect(pX, pY, pScaled, pH);
94
- }
94
+ }
95
95
 
96
96
  /**
97
97
  *
@@ -151,7 +151,7 @@ public class CustomHorizontalSlider extends SliderBar {
151
151
  }
152
152
  setValue(pValue + delta);
153
153
  }
154
-
154
+
155
155
  /**
156
156
  *
157
157
  * @return
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-18 Martin Prout
2
+ * Copyright (c) 2016-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-18 Martin Prout
2
+ * Copyright (c) 2016-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -23,10 +23,10 @@ import processing.core.PApplet;
23
23
  import processing.core.PConstants;
24
24
 
25
25
  public class SimpleHorizontalSlider extends SimpleSlider {
26
-
26
+
27
27
  final int SPACING = 20;
28
28
  final int LEFT_SPC = SPACING * 2;
29
- final int RIGHT_SPC = SPACING * 4;
29
+ final int RIGHT_SPC = SPACING * 4;
30
30
 
31
31
  /**
32
32
  *
@@ -58,7 +58,7 @@ public class SimpleHorizontalSlider extends SimpleSlider {
58
58
  applet.registerMethod("dispose", this);
59
59
  applet.registerMethod("draw", this);
60
60
  } else {
61
- applet.unregisterMethod("draw", this);
61
+ applet.unregisterMethod("draw", this);
62
62
  }
63
63
  }
64
64
 
@@ -75,12 +75,12 @@ public class SimpleHorizontalSlider extends SimpleSlider {
75
75
  applet.textSize(numberSize);
76
76
  applet.fill(numbersColor);
77
77
  applet.textAlign(PConstants.LEFT);
78
- applet.text(String.format(lFormat, (int) vMin), pX, pY );
78
+ applet.text(String.format(lFormat, (int) vMin), pX, pY);
79
79
  applet.textAlign(PConstants.RIGHT);
80
- applet.text(String.format(lFormat, (int) vMax), pX + pW, pY );
80
+ applet.text(String.format(lFormat, (int) vMax), pX + pW, pY);
81
81
  }
82
82
  }
83
-
83
+
84
84
  @Override
85
85
  void drawGui() {
86
86
  if (backgroundVisible) {
@@ -90,7 +90,7 @@ public class SimpleHorizontalSlider extends SimpleSlider {
90
90
  applet.noStroke();
91
91
  applet.fill(255);
92
92
  applet.ellipse(pX + pScaled, pY + pH / 2, 10, 10);
93
- }
93
+ }
94
94
 
95
95
  /**
96
96
  *
@@ -132,7 +132,7 @@ public class SimpleHorizontalSlider extends SimpleSlider {
132
132
  pScaled = map(pValue, vMin, vMax, 0, pW);
133
133
  }
134
134
  }
135
-
135
+
136
136
  /**
137
137
  *
138
138
  * @return
@@ -44,7 +44,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
44
44
 
45
45
  abstract void drawGui();
46
46
 
47
-
48
47
  @Override
49
48
  public void draw() {
50
49
  applet.pushStyle();
@@ -58,7 +57,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
58
57
  /**
59
58
  *
60
59
  */
61
-
62
60
  @Override
63
61
  public void showLabel() {
64
62
  displayLabel = true;
@@ -67,7 +65,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
67
65
  /**
68
66
  *
69
67
  */
70
-
71
68
  @Override
72
69
  public void hideLabel() {
73
70
  displayLabel = false;
@@ -76,7 +73,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
76
73
  /**
77
74
  *
78
75
  */
79
-
80
76
  @Override
81
77
  public void showNumbers() {
82
78
  displayValue = true;
@@ -97,7 +93,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
97
93
  /**
98
94
  *
99
95
  */
100
-
101
96
  @Override
102
97
  public void hideBackground() {
103
98
  backgroundVisible = false;
@@ -107,7 +102,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
107
102
  *
108
103
  * @return
109
104
  */
110
-
111
105
  @Override
112
106
  public float readValue() {
113
107
  return pValue;
@@ -129,7 +123,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
129
123
  *
130
124
  * @param s
131
125
  */
132
-
133
126
  @Override
134
127
  public void labelSize(int s) {
135
128
  labelSize = (s < 4) ? 4 : s;
@@ -145,7 +138,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
145
138
 
146
139
  abstract void checkKeyboard();
147
140
 
148
-
149
141
  protected int constrainMap(double val, double begIn, double endIn, double beginOut, double endOut) {
150
142
  double max = Math.max(begIn, endIn);
151
143
  double min = Math.min(begIn, endIn);
@@ -167,7 +159,6 @@ public abstract class SimpleSlider implements Slider {//implements Slider {
167
159
  }
168
160
  }
169
161
 
170
-
171
162
  @Override
172
163
  public void dispose() {
173
164
  setActive(false);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-18 Martin Prout
2
+ * Copyright (c) 2016-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -24,10 +24,10 @@ import processing.core.PConstants;
24
24
  import static processing.core.PConstants.HALF_PI;
25
25
 
26
26
  public class SimpleVerticalSlider extends SimpleSlider {
27
-
27
+
28
28
  final int SPACING = 20;
29
29
  final int TOP_SPC = SPACING * 2;
30
- final int BOTTOM_SPC = SPACING * 4;
30
+ final int BOTTOM_SPC = SPACING * 4;
31
31
 
32
32
  /**
33
33
  *
@@ -38,18 +38,18 @@ public class SimpleVerticalSlider extends SimpleSlider {
38
38
  * @param count
39
39
  */
40
40
  public SimpleVerticalSlider(final PApplet outer, float beginRange, float endRange, float initial, int count) {
41
- this.applet = outer;
41
+ this.applet = outer;
42
42
  setActive(true);
43
- pX = outer.width - (TOP_SPC + count * SPACING);
43
+ pX = outer.width - (TOP_SPC + count * SPACING);
44
44
  pY = TOP_SPC;
45
45
  pW = outer.height - BOTTOM_SPC;
46
46
  pH = 10;
47
47
  ID = Integer.toString(count + 1);
48
48
  limits(beginRange, endRange);
49
-
49
+
50
50
  }
51
51
 
52
- @Override
52
+ @Override
53
53
  boolean mouseOver() {
54
54
  return (applet.mouseX >= pX && applet.mouseX <= pX + pH && applet.mouseY >= pY && applet.mouseY <= pY + pW);
55
55
  }
@@ -59,11 +59,11 @@ public class SimpleVerticalSlider extends SimpleSlider {
59
59
  applet.registerMethod("dispose", this);
60
60
  applet.registerMethod("draw", this);
61
61
  } else {
62
- applet.unregisterMethod("draw", this);
62
+ applet.unregisterMethod("draw", this);
63
63
  }
64
64
  }
65
65
 
66
- @Override
66
+ @Override
67
67
  void displayText() {
68
68
  String lFormat = "%d";
69
69
  if (displayLabel) {
@@ -93,7 +93,7 @@ public class SimpleVerticalSlider extends SimpleSlider {
93
93
  applet.popMatrix();
94
94
  }
95
95
  }
96
-
96
+
97
97
  @Override
98
98
  void drawGui() {
99
99
  if (backgroundVisible) {
@@ -103,8 +103,6 @@ public class SimpleVerticalSlider extends SimpleSlider {
103
103
  applet.fill(sliderFill);
104
104
  applet.ellipse(pX + pH / 2, pY + pScaled, 10, 10);
105
105
  }
106
-
107
-
108
106
 
109
107
  /**
110
108
  *
@@ -146,7 +144,7 @@ public class SimpleVerticalSlider extends SimpleSlider {
146
144
  pScaled = map(pValue, vMin, vMax, pW, 0);
147
145
  }
148
146
  }
149
-
147
+
150
148
  /**
151
149
  *
152
150
  * @return
@@ -57,5 +57,5 @@ public interface Slider {
57
57
  *
58
58
  */
59
59
  void showNumbers();
60
-
60
+
61
61
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-18 Martin Prout
2
+ * Copyright (c) 2016-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-18 Martin Prout
2
+ * Copyright (c) 2016-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-18 Martin Prout
2
+ * Copyright (c) 2016-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -20,16 +20,15 @@
20
20
  package monkstone.slider;
21
21
 
22
22
  /**
23
- * @author Martin Prout
24
- * from a borrowed pattern seen in Jonathan Feinbergs Peasycam
25
- * when I was struggling with non functioning browser applet,
26
- * probably superfluous here.
23
+ * @author Martin Prout from a borrowed pattern seen in Jonathan Feinbergs
24
+ * Peasycam when I was struggling with non functioning browser applet, probably
25
+ * superfluous here.
27
26
  */
28
- public interface WheelHandler {
27
+ public interface WheelHandler {
28
+
29
29
  /**
30
- *
30
+ *
31
31
  * @param amount int
32
- */
33
-
32
+ */
34
33
  public void handleWheel(final short amount);
35
34
  }
@@ -27,7 +27,7 @@ public class AppRender implements JRender {
27
27
  public void vertex(double x, double y) {
28
28
  app.vertex((float) x, (float) y);
29
29
  }
30
-
30
+
31
31
  /**
32
32
  *
33
33
  * @param x double
@@ -72,7 +72,7 @@ public class AppRender implements JRender {
72
72
  public void vertex(double x, double y, double z, double u, double v) {
73
73
  app.vertex((float) x, (float) y, (float) z, (float) u, (float) v);
74
74
  }
75
-
75
+
76
76
  /**
77
77
  *
78
78
  * @param x double
@@ -28,7 +28,7 @@ public class ShapeRender implements JRender {
28
28
  public void vertex(double x, double y) {
29
29
  shape.vertex((float) x, (float) y);
30
30
  }
31
-
31
+
32
32
  /**
33
33
  *
34
34
  * @param x double
@@ -73,7 +73,7 @@ public class ShapeRender implements JRender {
73
73
  public void vertex(double x, double y, double z, double u, double v) {
74
74
  shape.vertex((float) x, (float) y, (float) z, (float) u, (float) v);
75
75
  }
76
-
76
+
77
77
  /**
78
78
  *
79
79
  * @param x double
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2015-18 Martin Prout
2
+ * Copyright (c) 2015-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -16,5 +16,5 @@
16
16
  * You should have received a copy of the GNU Lesser General Public
17
17
  * License along with this library; if not, write to the Free Software
18
18
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
- */
19
+ */
20
20
  package monkstone.vecmath;
@@ -1,7 +1,7 @@
1
1
  package monkstone.vecmath.vec2;
2
2
 
3
3
  /*
4
- * Copyright (c) 2015-18 Martin Prout
4
+ * Copyright (c) 2015-19 Martin Prout
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
7
7
  * modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,7 @@ package monkstone.vecmath.vec2;
20
20
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
21
  *
22
22
  * fastAtan2 algorithm from https://github.com/libgdx/libgdx (Apache 2.0 license)
23
- */
23
+ */
24
24
  import org.jruby.Ruby;
25
25
  import org.jruby.RubyArray;
26
26
  import org.jruby.RubyClass;
@@ -1,7 +1,7 @@
1
1
  package monkstone.vecmath.vec3;
2
2
 
3
3
  /*
4
- * Copyright (c) 2015-18 Martin Prout
4
+ * Copyright (c) 2015-19 Martin Prout
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
7
7
  * modify it under the terms of the GNU Lesser General Public
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2015-18 Martin Prout
2
+ * Copyright (c) 2015-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -17,26 +17,32 @@
17
17
  * License along with this library; if not, write to the Free Software
18
18
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
19
  */
20
-
21
20
  package monkstone.videoevent;
21
+
22
22
  import processing.video.Movie;
23
23
  import processing.video.Capture;
24
+
24
25
  /**
25
- * This interface makes it easier/possible to use the reflection methods
26
- * from Movie and Capture classes in Propane::App in propane
26
+ * This interface makes it easier/possible to use the reflection methods from
27
+ * Movie and Capture classes in Propane::App in propane
28
+ *
27
29
  * @author Martin Prout
28
30
  */
29
31
  public interface VideoInterface {
32
+
30
33
  /**
31
34
  * Used to implement reflection method in PApplet
35
+ *
32
36
  * @see processing.video.Movie
33
37
  * @param movie Movie
34
38
  */
35
39
  public void movieEvent(Movie movie);
40
+
36
41
  /**
37
42
  * Used to implement reflection method in PApplet
43
+ *
38
44
  * @see processing.video.Capture
39
45
  * @param capture Capture
40
46
  */
41
- public void captureEvent(Capture capture);
47
+ public void captureEvent(Capture capture);
42
48
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2015-18 Martin Prout
2
+ * Copyright (c) 2015-19 Martin Prout
3
3
  *
4
4
  * This library is free software; you can redistribute it and/or
5
5
  * modify it under the terms of the GNU Lesser General Public
@@ -16,5 +16,5 @@
16
16
  * You should have received a copy of the GNU Lesser General Public
17
17
  * License along with this library; if not, write to the Free Software
18
18
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
- */
19
+ */
20
20
  package monkstone.videoevent;