propane 0.3.0.pre-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.mvn/extensions.xml +8 -0
- data/.mvn/wrapper/maven-wrapper.properties +1 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +69 -0
- data/Rakefile +59 -0
- data/VERSION.txt +4 -0
- data/bin/propane +8 -0
- data/examples/complete/Rakefile +32 -0
- data/examples/complete/data/Texture01.jpg +0 -0
- data/examples/complete/data/Texture02.jpg +0 -0
- data/examples/complete/data/Univers45.vlw +0 -0
- data/examples/complete/data/displaceFrag.glsl +8 -0
- data/examples/complete/data/displaceVert.glsl +201 -0
- data/examples/complete/glsl_heightmap_noise.rb +121 -0
- data/examples/complete/kinetic_type.rb +79 -0
- data/examples/regular/Rakefile +30 -0
- data/examples/regular/arcball_box.rb +36 -0
- data/examples/regular/creating_colors.rb +57 -0
- data/examples/regular/elegant_ball.rb +159 -0
- data/examples/regular/flight_patterns.rb +63 -0
- data/examples/regular/grey_circles.rb +28 -0
- data/examples/regular/jwishy.rb +100 -0
- data/examples/regular/letters.rb +42 -0
- data/examples/regular/lib/boundary.rb +38 -0
- data/examples/regular/lib/particle.rb +77 -0
- data/examples/regular/lib/particle_system.rb +111 -0
- data/examples/regular/liquidy.rb +40 -0
- data/examples/regular/mouse_button_demo.rb +34 -0
- data/examples/regular/polyhedrons.rb +248 -0
- data/examples/regular/ribbon_doodle.rb +89 -0
- data/examples/regular/vector_math.rb +36 -0
- data/examples/regular/words.rb +41 -0
- data/lib/PROCESSING_LICENSE.txt +456 -0
- data/lib/export.txt +10 -0
- data/lib/propane.rb +12 -0
- data/lib/propane/app.rb +197 -0
- data/lib/propane/helper_methods.rb +177 -0
- data/lib/propane/helpers/numeric.rb +9 -0
- data/lib/propane/library_loader.rb +117 -0
- data/lib/propane/runner.rb +88 -0
- data/lib/propane/underscorer.rb +19 -0
- data/lib/propane/version.rb +5 -0
- data/library/boids/boids.rb +201 -0
- data/library/control_panel/control_panel.rb +172 -0
- data/pom.rb +113 -0
- data/pom.xml +198 -0
- data/propane.gemspec +28 -0
- data/src/monkstone/ColorUtil.java +67 -0
- data/src/monkstone/MathTool.java +195 -0
- data/src/monkstone/PropaneLibrary.java +47 -0
- data/src/monkstone/core/AbstractLibrary.java +102 -0
- data/src/monkstone/fastmath/Deglut.java +115 -0
- data/src/monkstone/vecmath/AppRender.java +87 -0
- data/src/monkstone/vecmath/JRender.java +56 -0
- data/src/monkstone/vecmath/ShapeRender.java +87 -0
- data/src/monkstone/vecmath/vec2/Vec2.java +670 -0
- data/src/monkstone/vecmath/vec3/Vec3.java +708 -0
- data/test/respond_to_test.rb +208 -0
- data/vendors/Rakefile +48 -0
- metadata +130 -0
@@ -0,0 +1,208 @@
|
|
1
|
+
gem 'minitest' # don't use bundled minitest
|
2
|
+
require 'java'
|
3
|
+
require 'minitest/autorun'
|
4
|
+
require 'minitest/pride'
|
5
|
+
|
6
|
+
require_relative '../lib/propane'
|
7
|
+
|
8
|
+
METHODS = %i(
|
9
|
+
alpha
|
10
|
+
ambient
|
11
|
+
ambient_light
|
12
|
+
apply_matrix
|
13
|
+
arc
|
14
|
+
background
|
15
|
+
begin_camera
|
16
|
+
begin_contour
|
17
|
+
begin_raw
|
18
|
+
begin_record
|
19
|
+
begin_shape
|
20
|
+
bezier
|
21
|
+
bezier_detail
|
22
|
+
bezier_point
|
23
|
+
bezier_tangent
|
24
|
+
bezier_vertex
|
25
|
+
blend
|
26
|
+
blend_mode
|
27
|
+
blue
|
28
|
+
box
|
29
|
+
brightness
|
30
|
+
camera
|
31
|
+
color
|
32
|
+
color_mode
|
33
|
+
copy
|
34
|
+
create_font
|
35
|
+
create_graphics
|
36
|
+
create_image
|
37
|
+
create_input
|
38
|
+
create_output
|
39
|
+
create_reader
|
40
|
+
create_shape
|
41
|
+
create_writer
|
42
|
+
cursor
|
43
|
+
curve
|
44
|
+
curve_detail
|
45
|
+
curve_point
|
46
|
+
curve_tangent
|
47
|
+
curve_tightness
|
48
|
+
curve_vertex
|
49
|
+
directional_light
|
50
|
+
ellipse
|
51
|
+
ellipse_mode
|
52
|
+
emissive
|
53
|
+
end_camera
|
54
|
+
end_contour
|
55
|
+
end_raw
|
56
|
+
end_record
|
57
|
+
end_shape
|
58
|
+
fill
|
59
|
+
filter
|
60
|
+
focused
|
61
|
+
frame_count
|
62
|
+
frame_rate
|
63
|
+
frame_rate
|
64
|
+
frustum
|
65
|
+
get
|
66
|
+
green
|
67
|
+
height
|
68
|
+
hue
|
69
|
+
image
|
70
|
+
image_mode
|
71
|
+
key
|
72
|
+
key_code
|
73
|
+
key_pressed
|
74
|
+
key_pressed?
|
75
|
+
key_released
|
76
|
+
key_typed
|
77
|
+
lerp_color
|
78
|
+
light_falloff
|
79
|
+
light_specular
|
80
|
+
lights
|
81
|
+
line
|
82
|
+
load_bytes
|
83
|
+
load_font
|
84
|
+
load_image
|
85
|
+
load_pixels
|
86
|
+
load_shader
|
87
|
+
load_shape
|
88
|
+
load_strings
|
89
|
+
load_table
|
90
|
+
load_xml
|
91
|
+
model_x
|
92
|
+
model_y
|
93
|
+
model_z
|
94
|
+
mouse_button
|
95
|
+
mouse_clicked
|
96
|
+
mouse_dragged
|
97
|
+
mouse_moved
|
98
|
+
mouse_pressed
|
99
|
+
mouse_pressed?
|
100
|
+
mouse_released
|
101
|
+
mouse_x
|
102
|
+
mouse_y
|
103
|
+
no_cursor
|
104
|
+
no_fill
|
105
|
+
no_lights
|
106
|
+
no_smooth
|
107
|
+
no_stroke
|
108
|
+
no_tint
|
109
|
+
noise
|
110
|
+
noise_detail
|
111
|
+
noise_seed
|
112
|
+
normal
|
113
|
+
ortho
|
114
|
+
perspective
|
115
|
+
pixels
|
116
|
+
pmouse_x
|
117
|
+
pmouse_y
|
118
|
+
point
|
119
|
+
point_light
|
120
|
+
pop_matrix
|
121
|
+
print_camera
|
122
|
+
print_matrix
|
123
|
+
print_projection
|
124
|
+
push_matrix
|
125
|
+
quad
|
126
|
+
quadratic_vertex
|
127
|
+
random
|
128
|
+
random_seed
|
129
|
+
rect
|
130
|
+
rect_mode
|
131
|
+
red
|
132
|
+
request_image
|
133
|
+
reset_matrix
|
134
|
+
reset_shader
|
135
|
+
rotate
|
136
|
+
rotate_x
|
137
|
+
rotate_y
|
138
|
+
rotate_z
|
139
|
+
saturation
|
140
|
+
save
|
141
|
+
save_bytes
|
142
|
+
save_frame
|
143
|
+
save_stream
|
144
|
+
save_strings
|
145
|
+
scale
|
146
|
+
screen_x
|
147
|
+
screen_y
|
148
|
+
screen_z
|
149
|
+
select_folder
|
150
|
+
select_input
|
151
|
+
select_output
|
152
|
+
set
|
153
|
+
shader
|
154
|
+
shape
|
155
|
+
shape_mode
|
156
|
+
shear_x
|
157
|
+
shear_y
|
158
|
+
shininess
|
159
|
+
size
|
160
|
+
smooth
|
161
|
+
specular
|
162
|
+
sphere
|
163
|
+
sphere_detail
|
164
|
+
spot_light
|
165
|
+
stroke
|
166
|
+
stroke_cap
|
167
|
+
stroke_join
|
168
|
+
stroke_weight
|
169
|
+
text_align
|
170
|
+
text_ascent
|
171
|
+
text_descent
|
172
|
+
text_font
|
173
|
+
text_leading
|
174
|
+
text_mode
|
175
|
+
text_size
|
176
|
+
text_width
|
177
|
+
texture
|
178
|
+
texture_mode
|
179
|
+
texture_wrap
|
180
|
+
tint
|
181
|
+
translate
|
182
|
+
triangle
|
183
|
+
update_pixels
|
184
|
+
vertex
|
185
|
+
width
|
186
|
+
)
|
187
|
+
|
188
|
+
class TestSketch < Propane::App
|
189
|
+
def draw
|
190
|
+
exit if frame_count > 30
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
class SpecTest < Minitest::Test
|
195
|
+
def setup
|
196
|
+
@processing_sketch = TestSketch.new title: 'sketch'
|
197
|
+
end
|
198
|
+
|
199
|
+
def test_respond
|
200
|
+
METHODS.each do |method_string|
|
201
|
+
assert_respond_to @processing_sketch, method_string
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
def tear_down
|
206
|
+
@processing_sketch = nil?
|
207
|
+
end
|
208
|
+
end
|
data/vendors/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# frozen_string_literal: false
|
3
|
+
require 'rake/clean'
|
4
|
+
|
5
|
+
WARNING = <<-EOS
|
6
|
+
WARNING: you may not have wget installed, you could just download
|
7
|
+
the correct version of jruby-complete to the vendors folder, and
|
8
|
+
re-run
|
9
|
+
EOS
|
10
|
+
|
11
|
+
JRUBYC_VERSION = '9.0.5.0'.freeze
|
12
|
+
|
13
|
+
CLOBBER.include("jruby-complete-#{JRUBYC_VERSION}.jar")
|
14
|
+
|
15
|
+
desc 'download, and copy to propane'
|
16
|
+
task default: [:download, :copy_ruby]
|
17
|
+
|
18
|
+
desc 'download JRuby upstream sources'
|
19
|
+
task download: ["jruby-complete-#{JRUBYC_VERSION}.jar"]
|
20
|
+
|
21
|
+
file "jruby-complete-#{JRUBYC_VERSION}.jar" do
|
22
|
+
begin
|
23
|
+
sh "wget https://s3.amazonaws.com/jruby.org/downloads/#{JRUBYC_VERSION}/jruby-complete-#{JRUBYC_VERSION}.jar"
|
24
|
+
rescue
|
25
|
+
warn(WARNING)
|
26
|
+
end
|
27
|
+
check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", '7fe1054bf6085f24b9e3069d3e93abf8f17d1448f503eaea2042f98bce2a1d43')
|
28
|
+
end
|
29
|
+
|
30
|
+
directory '../lib/ruby'
|
31
|
+
|
32
|
+
desc 'copy jruby-complete'
|
33
|
+
task copy_ruby: ["../lib/ruby"] do
|
34
|
+
sh "cp -v jruby-complete-#{JRUBYC_VERSION}.jar ../lib/ruby/jruby-complete.jar"
|
35
|
+
end
|
36
|
+
|
37
|
+
def check_sha256(filename, expected_hash)
|
38
|
+
require 'digest'
|
39
|
+
sha256 = Digest::SHA256.new
|
40
|
+
File.open(filename, 'r') do |f|
|
41
|
+
while buf = f.read(4096)
|
42
|
+
sha256.update(buf)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
if sha256.hexdigest != expected_hash
|
46
|
+
raise "bad sha256 checksum for #{filename} (expected #{expected_hash} got #{sha256.hexdigest})"
|
47
|
+
end
|
48
|
+
end
|
metadata
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: propane
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0.pre
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- filib
|
8
|
+
- monkstone
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: arcball
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.0.1
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.0.1
|
28
|
+
description: A Standalone Ruby Processing implementation
|
29
|
+
email:
|
30
|
+
- martin_p@lineone.net
|
31
|
+
executables:
|
32
|
+
- propane
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- ".gitignore"
|
37
|
+
- ".mvn/extensions.xml"
|
38
|
+
- ".mvn/wrapper/maven-wrapper.properties"
|
39
|
+
- ".travis.yml"
|
40
|
+
- Gemfile
|
41
|
+
- LICENSE.txt
|
42
|
+
- README.md
|
43
|
+
- Rakefile
|
44
|
+
- VERSION.txt
|
45
|
+
- bin/propane
|
46
|
+
- examples/complete/Rakefile
|
47
|
+
- examples/complete/data/Texture01.jpg
|
48
|
+
- examples/complete/data/Texture02.jpg
|
49
|
+
- examples/complete/data/Univers45.vlw
|
50
|
+
- examples/complete/data/displaceFrag.glsl
|
51
|
+
- examples/complete/data/displaceVert.glsl
|
52
|
+
- examples/complete/glsl_heightmap_noise.rb
|
53
|
+
- examples/complete/kinetic_type.rb
|
54
|
+
- examples/regular/Rakefile
|
55
|
+
- examples/regular/arcball_box.rb
|
56
|
+
- examples/regular/creating_colors.rb
|
57
|
+
- examples/regular/elegant_ball.rb
|
58
|
+
- examples/regular/flight_patterns.rb
|
59
|
+
- examples/regular/grey_circles.rb
|
60
|
+
- examples/regular/jwishy.rb
|
61
|
+
- examples/regular/letters.rb
|
62
|
+
- examples/regular/lib/boundary.rb
|
63
|
+
- examples/regular/lib/particle.rb
|
64
|
+
- examples/regular/lib/particle_system.rb
|
65
|
+
- examples/regular/liquidy.rb
|
66
|
+
- examples/regular/mouse_button_demo.rb
|
67
|
+
- examples/regular/polyhedrons.rb
|
68
|
+
- examples/regular/ribbon_doodle.rb
|
69
|
+
- examples/regular/vector_math.rb
|
70
|
+
- examples/regular/words.rb
|
71
|
+
- lib/PROCESSING_LICENSE.txt
|
72
|
+
- lib/core-2.2.1.jar
|
73
|
+
- lib/export.txt
|
74
|
+
- lib/gluegen-rt-2.1.5-01-natives-linux-amd64.jar
|
75
|
+
- lib/gluegen-rt-2.1.5-01-natives-macosx-universal.jar
|
76
|
+
- lib/gluegen-rt-2.1.5-01.jar
|
77
|
+
- lib/jogl-all-2.1.5-01-natives-linux-amd64.jar
|
78
|
+
- lib/jogl-all-2.1.5-01-natives-macosx-universal.jar
|
79
|
+
- lib/propane.rb
|
80
|
+
- lib/propane/app.rb
|
81
|
+
- lib/propane/helper_methods.rb
|
82
|
+
- lib/propane/helpers/numeric.rb
|
83
|
+
- lib/propane/library_loader.rb
|
84
|
+
- lib/propane/runner.rb
|
85
|
+
- lib/propane/underscorer.rb
|
86
|
+
- lib/propane/version.rb
|
87
|
+
- lib/rpextras.jar
|
88
|
+
- library/boids/boids.rb
|
89
|
+
- library/control_panel/control_panel.rb
|
90
|
+
- pom.rb
|
91
|
+
- pom.xml
|
92
|
+
- propane.gemspec
|
93
|
+
- src/monkstone/ColorUtil.java
|
94
|
+
- src/monkstone/MathTool.java
|
95
|
+
- src/monkstone/PropaneLibrary.java
|
96
|
+
- src/monkstone/core/AbstractLibrary.java
|
97
|
+
- src/monkstone/fastmath/Deglut.java
|
98
|
+
- src/monkstone/vecmath/AppRender.java
|
99
|
+
- src/monkstone/vecmath/JRender.java
|
100
|
+
- src/monkstone/vecmath/ShapeRender.java
|
101
|
+
- src/monkstone/vecmath/vec2/Vec2.java
|
102
|
+
- src/monkstone/vecmath/vec3/Vec3.java
|
103
|
+
- test/respond_to_test.rb
|
104
|
+
- vendors/Rakefile
|
105
|
+
homepage: https://github.com/monkstone/propane
|
106
|
+
licenses:
|
107
|
+
- MIT
|
108
|
+
metadata: {}
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 1.3.1
|
123
|
+
requirements: []
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 2.5.2
|
126
|
+
signing_key:
|
127
|
+
specification_version: 4
|
128
|
+
summary: A really slim layer between Ruby and Processing-2.2.1.
|
129
|
+
test_files:
|
130
|
+
- test/respond_to_test.rb
|