propane 0.5.0-java → 0.6.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +3 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/examples/complete/bw_shader.rb +46 -0
- data/examples/complete/data/bwfrag.glsl +23 -0
- data/examples/complete/data/lachoy.jpg +0 -0
- data/examples/complete/data/landscape.glsl +352 -0
- data/examples/complete/data/monjori.glsl +30 -0
- data/examples/complete/data/moon.jpg +0 -0
- data/examples/complete/data/sea.jpg +0 -0
- data/examples/complete/edge_detection.rb +49 -0
- data/examples/complete/landscape.rb +32 -0
- data/examples/complete/linear_image.rb +51 -0
- data/examples/complete/monjori.rb +33 -0
- data/examples/regular/arcball_box.rb +3 -1
- data/examples/regular/arcball_constrain.rb +38 -0
- data/examples/regular/bezier_playground.rb +205 -0
- data/examples/regular/colors_two.rb +61 -0
- data/examples/regular/creating_colors.rb +10 -3
- data/examples/regular/elegant_ball.rb +1 -1
- data/examples/regular/fibonacci_sphere.rb +90 -0
- data/examples/regular/grapher.rb +39 -0
- data/examples/regular/gravity.rb +120 -0
- data/examples/regular/slider_demo.rb +60 -0
- data/examples/regular/slider_example.rb +53 -0
- data/examples/regular/slider_simple.rb +47 -0
- data/examples/regular/tree.rb +76 -0
- data/lib/propane/app.rb +1 -6
- data/lib/propane/helper_methods.rb +39 -10
- data/lib/propane/version.rb +1 -1
- data/library/slider/slider.rb +43 -0
- data/pom.rb +4 -4
- data/pom.xml +4 -4
- data/propane.gemspec +1 -1
- data/src/monkstone/ColorUtil.java +42 -9
- data/src/monkstone/slider/CustomHorizontalSlider.java +164 -0
- data/src/monkstone/slider/CustomVerticalSlider.java +178 -0
- data/src/monkstone/slider/SimpleHorizontalSlider.java +145 -0
- data/src/monkstone/slider/SimpleSlider.java +175 -0
- data/src/monkstone/slider/SimpleVerticalSlider.java +159 -0
- data/src/monkstone/slider/Slider.java +61 -0
- data/src/monkstone/slider/SliderBar.java +245 -0
- data/src/monkstone/slider/SliderGroup.java +56 -0
- data/src/monkstone/slider/WheelHandler.java +35 -0
- data/src/monkstone/vecmath/vec2/Vec2.java +3 -8
- data/src/monkstone/vecmath/vec3/Vec3.java +8 -13
- data/vendors/Rakefile +2 -2
- metadata +36 -6
- data/VERSION.txt +0 -4
@@ -0,0 +1,56 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2016 Martin Prout
|
3
|
+
*
|
4
|
+
* This library is free software; you can redistribute it and/or
|
5
|
+
* modify it under the terms of the GNU Lesser General Public
|
6
|
+
* License as published by the Free Software Foundation; either
|
7
|
+
* version 2.1 of the License, or (at your option) any later version.
|
8
|
+
*
|
9
|
+
* http://creativecommons.org/licenses/LGPL/2.1/
|
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 Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
19
|
+
*/
|
20
|
+
package monkstone.slider;
|
21
|
+
|
22
|
+
import java.util.ArrayList;
|
23
|
+
import java.util.List;
|
24
|
+
import processing.core.PApplet;
|
25
|
+
|
26
|
+
public class SliderGroup {
|
27
|
+
|
28
|
+
int count = 0;
|
29
|
+
List<Slider> sliders;
|
30
|
+
PApplet applet;
|
31
|
+
boolean vertical;
|
32
|
+
|
33
|
+
public SliderGroup(final PApplet outer) {
|
34
|
+
applet = outer;
|
35
|
+
sliders = new ArrayList<>();
|
36
|
+
vertical = false;
|
37
|
+
}
|
38
|
+
|
39
|
+
public void vertical() {
|
40
|
+
vertical = true;
|
41
|
+
}
|
42
|
+
|
43
|
+
public void addSlider(float beginRange, float endRange, float initial) {
|
44
|
+
if (vertical) {
|
45
|
+
sliders.add(new SimpleVerticalSlider(applet, beginRange, endRange, initial, count));
|
46
|
+
} else {
|
47
|
+
sliders.add(new SimpleHorizontalSlider(applet, beginRange, endRange, initial, count));
|
48
|
+
}
|
49
|
+
count = sliders.size();
|
50
|
+
}
|
51
|
+
|
52
|
+
public float readValue(int count) {
|
53
|
+
return sliders.get(count).readValue();
|
54
|
+
}
|
55
|
+
|
56
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2016 Martin Prout
|
3
|
+
*
|
4
|
+
* This library is free software; you can redistribute it and/or
|
5
|
+
* modify it under the terms of the GNU Lesser General Public
|
6
|
+
* License as published by the Free Software Foundation; either
|
7
|
+
* version 2.1 of the License, or (at your option) any later version.
|
8
|
+
*
|
9
|
+
* http://creativecommons.org/licenses/LGPL/2.1/
|
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 Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
19
|
+
*/
|
20
|
+
package monkstone.slider;
|
21
|
+
|
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.
|
27
|
+
*/
|
28
|
+
public interface WheelHandler {
|
29
|
+
/**
|
30
|
+
*
|
31
|
+
* @param amount int
|
32
|
+
*/
|
33
|
+
|
34
|
+
public void handleWheel(final short amount);
|
35
|
+
}
|
@@ -58,15 +58,10 @@ public class Vec2 extends RubyObject {
|
|
58
58
|
* @param runtime
|
59
59
|
*/
|
60
60
|
public static void createVec2(final Ruby runtime) {
|
61
|
-
|
62
|
-
|
63
|
-
public IRubyObject allocate(Ruby runtime, RubyClass rubyClass) {
|
64
|
-
return new Vec2(runtime, rubyClass);
|
65
|
-
}
|
66
|
-
});
|
67
|
-
vec2Cls.defineAnnotatedMethods(Vec2.class);
|
68
|
-
|
61
|
+
RubyClass vec2Cls = runtime.defineClass("Vec2D", runtime.getObject(), (Ruby runtime1, RubyClass rubyClass) -> new Vec2(runtime1, rubyClass));
|
62
|
+
vec2Cls.defineAnnotatedMethods(Vec2.class);
|
69
63
|
}
|
64
|
+
|
70
65
|
|
71
66
|
/**
|
72
67
|
*
|
@@ -44,19 +44,14 @@ public final class Vec3 extends RubyObject {
|
|
44
44
|
|
45
45
|
private static final long serialVersionUID = 4563517343762009867L;
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
return new Vec3(runtime, rubyClass);
|
56
|
-
}
|
57
|
-
});
|
58
|
-
vec3Cls.defineAnnotatedMethods(Vec3.class);
|
59
|
-
}
|
47
|
+
/**
|
48
|
+
*
|
49
|
+
* @param runtime Ruby
|
50
|
+
*/
|
51
|
+
public static void createVec3(final Ruby runtime) {
|
52
|
+
RubyClass vec3Cls = runtime.defineClass("Vec3D", runtime.getObject(), (Ruby runtime1, RubyClass rubyClass) -> new Vec3(runtime1, rubyClass));
|
53
|
+
vec3Cls.defineAnnotatedMethods(Vec3.class);
|
54
|
+
}
|
60
55
|
|
61
56
|
static final double EPSILON = 9.999999747378752e-05; // matches processing.org EPSILON
|
62
57
|
private double jx = 0;
|
data/vendors/Rakefile
CHANGED
@@ -8,7 +8,7 @@ WARNING = <<-EOS
|
|
8
8
|
re-run
|
9
9
|
EOS
|
10
10
|
|
11
|
-
JRUBYC_VERSION = '9.0.
|
11
|
+
JRUBYC_VERSION = '9.1.0.0'.freeze
|
12
12
|
|
13
13
|
CLOBBER.include("jruby-complete-#{JRUBYC_VERSION}.jar")
|
14
14
|
|
@@ -24,7 +24,7 @@ file "jruby-complete-#{JRUBYC_VERSION}.jar" do
|
|
24
24
|
rescue
|
25
25
|
warn(WARNING)
|
26
26
|
end
|
27
|
-
check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar",
|
27
|
+
check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", "8a4b5f4cbdcfd43272002a543a59abfbf419577ef679273d4893a4f09594267e")
|
28
28
|
end
|
29
29
|
|
30
30
|
directory '../lib/ruby'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: propane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- filib
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: arcball
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.0.
|
20
|
+
version: 0.0.2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.0.
|
27
|
+
version: 0.0.2
|
28
28
|
description: A Standalone Ruby Processing implementation
|
29
29
|
email:
|
30
30
|
- martin_p@lineone.net
|
@@ -44,26 +44,42 @@ files:
|
|
44
44
|
- LICENSE.txt
|
45
45
|
- README.md
|
46
46
|
- Rakefile
|
47
|
-
- VERSION.txt
|
48
47
|
- bin/propane
|
49
48
|
- examples/complete/Rakefile
|
49
|
+
- examples/complete/bw_shader.rb
|
50
50
|
- examples/complete/data/Texture01.jpg
|
51
51
|
- examples/complete/data/Texture02.jpg
|
52
52
|
- examples/complete/data/Univers45.vlw
|
53
|
+
- examples/complete/data/bwfrag.glsl
|
53
54
|
- examples/complete/data/displaceFrag.glsl
|
54
55
|
- examples/complete/data/displaceVert.glsl
|
56
|
+
- examples/complete/data/lachoy.jpg
|
57
|
+
- examples/complete/data/landscape.glsl
|
58
|
+
- examples/complete/data/monjori.glsl
|
59
|
+
- examples/complete/data/moon.jpg
|
60
|
+
- examples/complete/data/sea.jpg
|
61
|
+
- examples/complete/edge_detection.rb
|
55
62
|
- examples/complete/glsl_heightmap_noise.rb
|
56
63
|
- examples/complete/kinetic_type.rb
|
64
|
+
- examples/complete/landscape.rb
|
65
|
+
- examples/complete/linear_image.rb
|
66
|
+
- examples/complete/monjori.rb
|
57
67
|
- examples/regular/Rakefile
|
58
68
|
- examples/regular/arcball_box.rb
|
69
|
+
- examples/regular/arcball_constrain.rb
|
70
|
+
- examples/regular/bezier_playground.rb
|
59
71
|
- examples/regular/circle_collision.rb
|
72
|
+
- examples/regular/colors_two.rb
|
60
73
|
- examples/regular/creating_colors.rb
|
61
74
|
- examples/regular/drawolver.rb
|
62
75
|
- examples/regular/elegant_ball.rb
|
63
76
|
- examples/regular/empathy.rb
|
64
77
|
- examples/regular/fern.rb
|
78
|
+
- examples/regular/fibonacci_sphere.rb
|
65
79
|
- examples/regular/flight_patterns.rb
|
66
80
|
- examples/regular/fractions.rb
|
81
|
+
- examples/regular/grapher.rb
|
82
|
+
- examples/regular/gravity.rb
|
67
83
|
- examples/regular/grey_circles.rb
|
68
84
|
- examples/regular/jwishy.rb
|
69
85
|
- examples/regular/letters.rb
|
@@ -76,6 +92,10 @@ files:
|
|
76
92
|
- examples/regular/polyhedrons.rb
|
77
93
|
- examples/regular/raining.rb
|
78
94
|
- examples/regular/ribbon_doodle.rb
|
95
|
+
- examples/regular/slider_demo.rb
|
96
|
+
- examples/regular/slider_example.rb
|
97
|
+
- examples/regular/slider_simple.rb
|
98
|
+
- examples/regular/tree.rb
|
79
99
|
- examples/regular/vector_math.rb
|
80
100
|
- examples/regular/words.rb
|
81
101
|
- lib/PROCESSING_LICENSE.txt
|
@@ -100,6 +120,7 @@ files:
|
|
100
120
|
- lib/propane/version.rb
|
101
121
|
- library/boids/boids.rb
|
102
122
|
- library/control_panel/control_panel.rb
|
123
|
+
- library/slider/slider.rb
|
103
124
|
- pom.rb
|
104
125
|
- pom.xml
|
105
126
|
- propane.gemspec
|
@@ -108,6 +129,15 @@ files:
|
|
108
129
|
- src/monkstone/PropaneLibrary.java
|
109
130
|
- src/monkstone/core/AbstractLibrary.java
|
110
131
|
- src/monkstone/fastmath/Deglut.java
|
132
|
+
- src/monkstone/slider/CustomHorizontalSlider.java
|
133
|
+
- src/monkstone/slider/CustomVerticalSlider.java
|
134
|
+
- src/monkstone/slider/SimpleHorizontalSlider.java
|
135
|
+
- src/monkstone/slider/SimpleSlider.java
|
136
|
+
- src/monkstone/slider/SimpleVerticalSlider.java
|
137
|
+
- src/monkstone/slider/Slider.java
|
138
|
+
- src/monkstone/slider/SliderBar.java
|
139
|
+
- src/monkstone/slider/SliderGroup.java
|
140
|
+
- src/monkstone/slider/WheelHandler.java
|
111
141
|
- src/monkstone/vecmath/AppRender.java
|
112
142
|
- src/monkstone/vecmath/JRender.java
|
113
143
|
- src/monkstone/vecmath/ShapeRender.java
|
@@ -135,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
165
|
version: '0'
|
136
166
|
requirements: []
|
137
167
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.6.3
|
139
169
|
signing_key:
|
140
170
|
specification_version: 4
|
141
171
|
summary: A really slim layer between Ruby and Processing-2.2.1.
|
data/VERSION.txt
DELETED