propane 3.1.0.pre-java → 3.2.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 (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
@@ -1,5 +1,3 @@
1
- /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
-
3
1
  /*
4
2
  Part of the Processing project - http://processing.org
5
3
 
@@ -20,69 +18,69 @@
20
18
  Public License along with this library; if not, write to the
21
19
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
22
20
  Boston, MA 02111-1307 USA
23
- */
24
-
21
+ */
25
22
  package processing.opengl;
26
23
 
27
24
  import processing.opengl.PGraphicsOpenGL.GLResourceVertexBuffer;
28
25
 
29
26
  // TODO: need to combine with PGraphicsOpenGL.VertexAttribute
30
27
  public class VertexBuffer {
31
- static protected final int INIT_VERTEX_BUFFER_SIZE = 256;
32
- static protected final int INIT_INDEX_BUFFER_SIZE = 512;
33
-
34
- public int glId;
35
- int target;
36
- int elementSize;
37
- int ncoords;
38
- boolean index;
39
-
40
- protected PGL pgl; // The interface between Processing and OpenGL.
41
- protected int context; // The context that created this texture.
42
- private GLResourceVertexBuffer glres;
43
-
44
- VertexBuffer(PGraphicsOpenGL pg, int target, int ncoords, int esize) {
45
- this(pg, target, ncoords, esize, false);
46
- }
47
-
48
- VertexBuffer(PGraphicsOpenGL pg, int target, int ncoords, int esize, boolean index) {
49
- pgl = pg.pgl;
50
- context = pgl.createEmptyContext();
51
-
52
- this.target = target;
53
- this.ncoords = ncoords;
54
- this.elementSize = esize;
55
- this.index = index;
56
- create();
57
- init();
58
- }
59
-
60
- protected void create() {
61
- context = pgl.getCurrentContext();
62
- glres = new GLResourceVertexBuffer(this);
63
- }
64
-
65
- protected void init() {
66
- int size = index ? ncoords * INIT_INDEX_BUFFER_SIZE * elementSize :
67
- ncoords * INIT_VERTEX_BUFFER_SIZE * elementSize;
68
- pgl.bindBuffer(target, glId);
69
- pgl.bufferData(target, size, null, PGL.STATIC_DRAW);
70
- }
71
-
72
- protected void dispose() {
73
- if (glres != null) {
74
- glres.dispose();
75
- glId = 0;
76
- glres = null;
28
+
29
+ static protected final int INIT_VERTEX_BUFFER_SIZE = 256;
30
+ static protected final int INIT_INDEX_BUFFER_SIZE = 512;
31
+
32
+ public int glId;
33
+ int target;
34
+ int elementSize;
35
+ int ncoords;
36
+ boolean index;
37
+
38
+ protected PGL pgl; // The interface between Processing and OpenGL.
39
+ protected int context; // The context that created this texture.
40
+ private GLResourceVertexBuffer glres;
41
+
42
+ VertexBuffer(PGraphicsOpenGL pg, int target, int ncoords, int esize) {
43
+ this(pg, target, ncoords, esize, false);
44
+ }
45
+
46
+ VertexBuffer(PGraphicsOpenGL pg, int target, int ncoords, int esize, boolean index) {
47
+ pgl = pg.pgl;
48
+ context = pgl.createEmptyContext();
49
+
50
+ this.target = target;
51
+ this.ncoords = ncoords;
52
+ this.elementSize = esize;
53
+ this.index = index;
54
+ create();
55
+ init();
56
+ }
57
+
58
+ protected void create() {
59
+ context = pgl.getCurrentContext();
60
+ glres = new GLResourceVertexBuffer(this);
61
+ }
62
+
63
+ protected void init() {
64
+ int size = index ? ncoords * INIT_INDEX_BUFFER_SIZE * elementSize
65
+ : ncoords * INIT_VERTEX_BUFFER_SIZE * elementSize;
66
+ pgl.bindBuffer(target, glId);
67
+ pgl.bufferData(target, size, null, PGL.STATIC_DRAW);
68
+ }
69
+
70
+ protected void dispose() {
71
+ if (glres != null) {
72
+ glres.dispose();
73
+ glId = 0;
74
+ glres = null;
75
+ }
77
76
  }
78
- }
79
77
 
80
- protected boolean contextIsOutdated() {
81
- boolean outdated = !pgl.contextIsCurrent(context);
82
- if (outdated) {
83
- dispose();
78
+ protected boolean contextIsOutdated() {
79
+ boolean outdated = !pgl.contextIsCurrent(context);
80
+ if (outdated) {
81
+ dispose();
82
+ }
83
+ return outdated;
84
84
  }
85
- return outdated;
86
- }
87
85
 
88
86
  }
@@ -10,7 +10,7 @@ SOUND_VERSION = 'v1.3.2' # version 1.3.2
10
10
  GLVIDEO = 'processing-glvideo.zip'
11
11
  VIDEO = 'video-2.zip'
12
12
  VIDEO_VERSION = '2' # version 1.0.1
13
- EXAMPLES = '2.3'.freeze
13
+ EXAMPLES = '2.4'.freeze
14
14
  HOME_DIR = ENV['HOME']
15
15
  MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propane
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.pre
4
+ version: 3.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - monkstone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-17 00:00:00.000000000 Z
11
+ date: 2019-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -69,6 +69,7 @@ files:
69
69
  - ".github/CONTRIBUTING.md"
70
70
  - ".github/ISSUE_TEMPLATE.md"
71
71
  - ".gitignore"
72
+ - ".mvn/wrapper/maven-wrapper.properties"
72
73
  - ".yardopts"
73
74
  - CHANGELOG.md
74
75
  - Gemfile
@@ -87,7 +88,7 @@ files:
87
88
  - lib/jogl-all-natives-macosx-universal.jar
88
89
  - lib/jogl-all-natives-windows-amd64.jar
89
90
  - lib/jogl-all.jar
90
- - lib/propane-3.1.0.jar
91
+ - lib/propane-3.2.0.jar
91
92
  - lib/propane.rb
92
93
  - lib/propane/app.rb
93
94
  - lib/propane/creators/sketch_class.rb
@@ -95,6 +96,7 @@ files:
95
96
  - lib/propane/creators/sketch_writer.rb
96
97
  - lib/propane/helper_methods.rb
97
98
  - lib/propane/helpers/numeric.rb
99
+ - lib/propane/helpers/version_error.rb
98
100
  - lib/propane/library.rb
99
101
  - lib/propane/library_loader.rb
100
102
  - lib/propane/native_folder.rb
@@ -112,6 +114,8 @@ files:
112
114
  - library/vector_utils/vector_utils.rb
113
115
  - library/video_event/video_event.rb
114
116
  - license.txt
117
+ - mvnw
118
+ - mvnw.cmd
115
119
  - pom.xml
116
120
  - propane.gemspec
117
121
  - src/main/java/japplemenubar/JAppleMenuBar.java
@@ -146,6 +150,7 @@ files:
146
150
  - src/main/java/processing/awt/PGraphicsJava2D.java
147
151
  - src/main/java/processing/awt/PShapeJava2D.java
148
152
  - src/main/java/processing/awt/PSurfaceAWT.java
153
+ - src/main/java/processing/core/DesktopHandler.java
149
154
  - src/main/java/processing/core/PApplet.java
150
155
  - src/main/java/processing/core/PConstants.java
151
156
  - src/main/java/processing/core/PFont.java
@@ -161,7 +166,6 @@ files:
161
166
  - src/main/java/processing/core/PSurface.java
162
167
  - src/main/java/processing/core/PSurfaceNone.java
163
168
  - src/main/java/processing/core/PVector.java
164
- - src/main/java/processing/core/ThinkDifferent.java
165
169
  - src/main/java/processing/data/DoubleDict.java
166
170
  - src/main/java/processing/data/DoubleList.java
167
171
  - src/main/java/processing/data/FloatDict.java
@@ -258,15 +262,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
258
262
  version: '0'
259
263
  required_rubygems_version: !ruby/object:Gem::Requirement
260
264
  requirements:
261
- - - ">"
265
+ - - ">="
262
266
  - !ruby/object:Gem::Version
263
- version: 1.3.1
267
+ version: '0'
264
268
  requirements:
265
269
  - java runtime >= 11.0.1+
266
- rubygems_version: 3.0.1
270
+ rubygems_version: 3.0.2
267
271
  signing_key:
268
272
  specification_version: 4
269
- summary: ruby wrapper for processing-3.4 on MacOS, linux and windows (64bit only)
273
+ summary: ruby wrapper for processing-3.5 on MacOS, linux and windows (64bit only)
270
274
  test_files:
271
275
  - test/create_test.rb
272
276
  - test/deglut_spec_test.rb
@@ -1,70 +0,0 @@
1
- /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
-
3
- /*
4
- Part of the Processing project - http://processing.org
5
-
6
- Copyright (c) 2012-2014 The Processing Foundation
7
- Copyright (c) 2007-2012 Ben Fry and Casey Reas
8
-
9
- This program is free software; you can redistribute it and/or
10
- modify it under the terms of the GNU General Public License
11
- version 2, as published by the Free Software Foundation.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program; if not, write to the Free Software Foundation,
20
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
- */
22
-
23
- package processing.core;
24
-
25
- import java.awt.Image;
26
- import java.awt.Taskbar;
27
- import java.awt.Desktop;
28
- import java.awt.desktop.QuitResponse;
29
- import java.awt.desktop.QuitEvent;
30
-
31
-
32
- public class ThinkDifferent {
33
-
34
- private static Desktop desktop;
35
- private static Taskbar taskbar;
36
- static boolean attemptedQuit;
37
-
38
-
39
- static public void init(final PApplet sketch) {
40
- if (taskbar == null) {
41
- taskbar = Taskbar.getTaskbar();
42
- }
43
- if (desktop == null) {
44
- desktop = Desktop.getDesktop();
45
- }
46
-
47
- desktop.setQuitHandler((QuitEvent event, QuitResponse response) -> {
48
- sketch.exit();
49
- if (PApplet.uncaughtThrowable == null && // no known crash
50
- !attemptedQuit) { // haven't tried yet
51
- response.cancelQuit(); // tell OS X we'll handle this
52
- attemptedQuit = true;
53
- } else {
54
- response.performQuit(); // just force it this time
55
- }
56
- });
57
- }
58
-
59
- static public void cleanup() {
60
- if (desktop == null) {
61
- desktop = Desktop.getDesktop();
62
- }
63
- desktop.setQuitHandler(null);
64
- }
65
-
66
- // Called via reflection from PSurfaceAWT and others
67
- static public void setIconImage(Image image) {
68
- taskbar.setIconImage(image);
69
- }
70
- }