propane 2.3.3-java → 2.3.4-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +10 -3
- data/Rakefile +1 -1
- data/lib/propane/app.rb +15 -17
- data/lib/propane/version.rb +1 -1
- data/library/control_panel/control_panel.rb +12 -8
- data/pom.rb +3 -3
- data/pom.xml +3 -3
- data/propane.gemspec +2 -2
- data/vendors/Rakefile +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40e07b8b28c5857b0f1738ddf80584a6c5f62764
|
4
|
+
data.tar.gz: 67dc8538463955bd26073f52dad1d0bb74a706c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01683ec9729539dd4a279e19b8661f9b446968bcfece74c796c98d988cd177b41a03396fd11dccf8ce8c75dfced4bdc13e92f2ca7a4abf1a8b989bdb5c56e007
|
7
|
+
data.tar.gz: bb8318aa7cbd0d5296027230db8eebc91a9cf1c03f2cdd9cd52e5411a8ba7be274e4bbcf5e0cc9ab23853db8888729d5ab8dda05093cff2362de58635f7fb561
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
**v2.3.4** Simplify control_panel library (replacing `c.title = 'PaneTitle'` with `c.title('PaneTitle')`) also enable use of `block` with `button's`.
|
2
|
+
|
1
3
|
**v2.3.3** Update to processing-3.3.4, and upgrade jruby-9.1.12.0 last in 9.1 series?
|
2
4
|
|
3
5
|
**v2.3.3** Update to processing-3.3.2
|
data/README.md
CHANGED
@@ -1,14 +1,21 @@
|
|
1
1
|
# Propane
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/propane.svg)](https://badge.fury.io/rb/propane) [![Travis CI](https://travis-ci.org/ruby-processing/propane.svg)](https://travis-ci.org/ruby-processing/propane)
|
3
3
|
|
4
|
-
A slim layer to communicate with Processing from JRuby, features a polyglot maven build. We have created a configuration free version of ruby processing, for processing-3.3.
|
4
|
+
A slim layer to communicate with Processing from JRuby, features a polyglot maven build. We have created a configuration free version of ruby processing, for processing-3.3.5, where we include processing core (from a local maven repository and opengl etc from maven central). These jars are small enough to include in a gem distribution, and hence we do not require configuration. This has created a scriptable version, ie files get run direct from jruby, but you could use jruby-complete if you used the propane script (avoids need to give the absolute data path for the data folder, but would also be needed for a watch mode). See guide to [building ruby-processing projects][building].
|
5
|
+
|
6
|
+
NB: The main reason for build failing is when the `core.jar` is not available from maven central, to install a local jar:-
|
7
|
+
```bash
|
8
|
+
|
9
|
+
mvn install:install-file /home/tux/processing-3.3.5/core/library/core.jar -DgroupId=org.processing -DartifactId=core -Dversion=3.3.5
|
10
|
+
```
|
11
|
+
adjust above for your OS/distro setup.
|
5
12
|
|
6
13
|
## Requirements
|
7
14
|
|
8
15
|
- jdk8+
|
9
16
|
- jruby-9.1.12.0
|
10
17
|
- mvn-3.5.0+
|
11
|
-
- core.jar processing-3.3.
|
18
|
+
- core.jar processing-3.3.5 (_build only_)
|
12
19
|
|
13
20
|
## Building and testing
|
14
21
|
|
@@ -21,7 +28,7 @@ rake javadoc
|
|
21
28
|
## Installation
|
22
29
|
```bash
|
23
30
|
jgem install propane # from rubygems
|
24
|
-
jgem install propane-2.3.
|
31
|
+
jgem install propane-2.3.4-java.gem # for local install
|
25
32
|
```
|
26
33
|
|
27
34
|
## Usage
|
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ def create_manifest
|
|
7
7
|
File.open('MANIFEST.MF', 'w') do |f|
|
8
8
|
f.puts(title)
|
9
9
|
f.puts(version)
|
10
|
-
f.puts('Class-Path: core-3.3.
|
10
|
+
f.puts('Class-Path: core-3.3.5.jar gluegen-rt-2.3.2.jar jog-all-2.3.2.jar')
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
data/lib/propane/app.rb
CHANGED
@@ -139,15 +139,15 @@ module Propane
|
|
139
139
|
|
140
140
|
def import_opengl
|
141
141
|
# Include processing opengl classes that we'd like to use:
|
142
|
-
%w
|
142
|
+
%w[FontTexture FrameBuffer LinePath LineStroker PGL
|
143
143
|
PGraphics2D PGraphics3D PGraphicsOpenGL PShader
|
144
|
-
PShapeOpenGL Texture
|
144
|
+
PShapeOpenGL Texture].each do |klass|
|
145
145
|
java_import "processing.opengl.#{klass}"
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
149
|
def proxy_java_fields
|
150
|
-
fields = %w
|
150
|
+
fields = %w[sketchPath key frameRate mousePressed keyPressed]
|
151
151
|
methods = fields.map { |field| java_class.declared_field(field) }
|
152
152
|
@declared_fields = Hash[fields.zip(methods)]
|
153
153
|
end
|
@@ -160,22 +160,20 @@ module Propane
|
|
160
160
|
end
|
161
161
|
end
|
162
162
|
|
163
|
-
#
|
164
|
-
#
|
165
|
-
# `include Math etc because we expect to use them`
|
166
|
-
# Using :method_missing to mimic inner class methods
|
167
|
-
# @HACK you should consider using 'forwardable' to avoid this
|
168
|
-
# egregious hack...
|
163
|
+
# @HACK purists may prefer 'forwardable' to the use of Proxy
|
164
|
+
# Importing PConstants here to access the processing constants
|
169
165
|
module Proxy
|
170
|
-
|
171
|
-
include
|
172
|
-
|
173
|
-
|
166
|
+
include Math
|
167
|
+
include HelperMethods
|
168
|
+
include Java::ProcessingCore::PConstants
|
169
|
+
|
170
|
+
def respond_to_missing?(symbol, include_priv = false)
|
171
|
+
$app.respond_to?(symbol, include_priv) || super
|
174
172
|
end
|
175
173
|
|
176
|
-
def method_missing(name, *args)
|
177
|
-
return $app.send(name, *args) if $app
|
174
|
+
def method_missing(name, *args, &block)
|
175
|
+
return $app.send(name, *args) if $app.respond_to? name
|
178
176
|
super
|
179
177
|
end
|
180
|
-
end
|
181
|
-
end
|
178
|
+
end # Processing::Proxy
|
179
|
+
end # Propane
|
data/lib/propane/version.rb
CHANGED
@@ -66,11 +66,11 @@ module ControlPanel
|
|
66
66
|
set_horizontal_alignment javax.swing.SwingConstants::CENTER
|
67
67
|
control_panel.add_element(self, name, false)
|
68
68
|
add_action_listener do
|
69
|
-
$app.instance_variable_set("@#{name}", value)
|
69
|
+
$app.instance_variable_set("@#{name}", value)
|
70
70
|
proc.call(value) if proc
|
71
71
|
end
|
72
72
|
end
|
73
|
-
|
73
|
+
# define value as checkbox state
|
74
74
|
def value
|
75
75
|
is_selected
|
76
76
|
end
|
@@ -83,7 +83,7 @@ module ControlPanel
|
|
83
83
|
set_preferred_size(java.awt.Dimension.new(170, 64))
|
84
84
|
control_panel.add_element(self, name, false, true)
|
85
85
|
add_action_listener do
|
86
|
-
$app.send(name
|
86
|
+
$app.send(name)
|
87
87
|
proc.call(value) if proc
|
88
88
|
end
|
89
89
|
end
|
@@ -126,6 +126,10 @@ module ControlPanel
|
|
126
126
|
dispose
|
127
127
|
end
|
128
128
|
|
129
|
+
def title(name)
|
130
|
+
set_title(name)
|
131
|
+
end
|
132
|
+
|
129
133
|
def slider(name, range = 0..100, initial_value = nil, &block)
|
130
134
|
Slider.new(self, name, range, initial_value, block || nil)
|
131
135
|
end
|
@@ -134,7 +138,7 @@ module ControlPanel
|
|
134
138
|
Menu.new(self, name, elements, initial_value, block || nil)
|
135
139
|
end
|
136
140
|
|
137
|
-
def checkbox(name, initial_value =
|
141
|
+
def checkbox(name, initial_value = false, &block)
|
138
142
|
checkbox = Checkbox.new(self, name, block || nil)
|
139
143
|
checkbox.do_click if initial_value == true
|
140
144
|
end
|
@@ -151,10 +155,10 @@ module ControlPanel
|
|
151
155
|
|
152
156
|
def set_feel(lf = 'metal')
|
153
157
|
lafinfo = javax.swing.UIManager.getInstalledLookAndFeels
|
154
|
-
laf = lafinfo.select do |info|
|
155
|
-
info.
|
158
|
+
laf = lafinfo.to_ary.select do |info|
|
159
|
+
info.name =~ Regexp.new(Regexp.escape(lf), Regexp::IGNORECASE)
|
156
160
|
end
|
157
|
-
javax.swing.UIManager.setLookAndFeel(laf[0].
|
161
|
+
javax.swing.UIManager.setLookAndFeel(laf[0].class_name)
|
158
162
|
end
|
159
163
|
end
|
160
164
|
|
@@ -169,4 +173,4 @@ module ControlPanel
|
|
169
173
|
end
|
170
174
|
end
|
171
175
|
|
172
|
-
Propane::App.
|
176
|
+
Propane::App.include(ControlPanel::InstanceMethods)
|
data/pom.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
project 'rp5extras', 'https://github.com/monkstone/propane' do
|
3
3
|
model_version '4.0.0'
|
4
|
-
id 'propane:propane', '2.3.
|
4
|
+
id 'propane:propane', '2.3.4'
|
5
5
|
packaging 'jar'
|
6
6
|
description 'rp5extras for propane'
|
7
7
|
organization 'ruby-processing', 'https://ruby-processing.github.io'
|
@@ -33,7 +33,7 @@ project 'rp5extras', 'https://github.com/monkstone/propane' do
|
|
33
33
|
)
|
34
34
|
|
35
35
|
pom 'org.jruby:jruby:9.1.12.0'
|
36
|
-
jar 'org.processing:core:3.3.
|
36
|
+
jar 'org.processing:core:3.3.5'
|
37
37
|
jar 'org.processing:video:3.0.2'
|
38
38
|
jar('org.jogamp.jogl:jogl-all:${jogl.version}')
|
39
39
|
jar('org.jogamp.gluegen:gluegen-rt-main:${jogl.version}')
|
@@ -44,7 +44,7 @@ project 'rp5extras', 'https://github.com/monkstone/propane' do
|
|
44
44
|
execute_goals( id: 'default-cli',
|
45
45
|
artifactItems: [ { groupId: 'org.processing',
|
46
46
|
artifactId: 'core',
|
47
|
-
version: '3.3.
|
47
|
+
version: '3.3.5',
|
48
48
|
type: 'jar',
|
49
49
|
outputDirectory: '${propane.basedir}/lib'
|
50
50
|
},
|
data/pom.xml
CHANGED
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
|
|
11
11
|
<modelVersion>4.0.0</modelVersion>
|
12
12
|
<groupId>propane</groupId>
|
13
13
|
<artifactId>propane</artifactId>
|
14
|
-
<version>2.3.
|
14
|
+
<version>2.3.4</version>
|
15
15
|
<name>rp5extras</name>
|
16
16
|
<description>rp5extras for propane</description>
|
17
17
|
<url>https://github.com/monkstone/propane</url>
|
@@ -64,7 +64,7 @@ DO NOT MODIFIY - GENERATED CODE
|
|
64
64
|
<dependency>
|
65
65
|
<groupId>org.processing</groupId>
|
66
66
|
<artifactId>core</artifactId>
|
67
|
-
<version>3.3.
|
67
|
+
<version>3.3.5</version>
|
68
68
|
</dependency>
|
69
69
|
<dependency>
|
70
70
|
<groupId>org.processing</groupId>
|
@@ -103,7 +103,7 @@ DO NOT MODIFIY - GENERATED CODE
|
|
103
103
|
<artifactItem>
|
104
104
|
<groupId>org.processing</groupId>
|
105
105
|
<artifactId>core</artifactId>
|
106
|
-
<version>3.3.
|
106
|
+
<version>3.3.5</version>
|
107
107
|
<type>jar</type>
|
108
108
|
<outputDirectory>${propane.basedir}/lib</outputDirectory>
|
109
109
|
</artifactItem>
|
data/propane.gemspec
CHANGED
@@ -10,11 +10,11 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ['mamba2928@yahoo.co.uk']
|
11
11
|
gem.licenses = %w(GPL-3.0 LGPL-2.0)
|
12
12
|
gem.description = %q{A batteries included version of processing in ruby, MacOS and linux64}
|
13
|
-
gem.summary = %q{ruby wrapper for processing-3.3.
|
13
|
+
gem.summary = %q{ruby wrapper for processing-3.3.5 on MacOS and linux64 bit only for opengl}
|
14
14
|
gem.homepage = 'https://ruby-processing.github.io/propane/'
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.files << 'lib/propane.jar'
|
17
|
-
gem.files << 'lib/core-3.3.
|
17
|
+
gem.files << 'lib/core-3.3.5.jar'
|
18
18
|
gem.files << 'lib/gluegen-rt-2.3.2.jar'
|
19
19
|
gem.files << 'lib/jogl-all-2.3.2.jar'
|
20
20
|
gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-amd64.jar'
|
data/vendors/Rakefile
CHANGED
@@ -9,7 +9,7 @@ SOUND = 'sound.zip'.freeze
|
|
9
9
|
SOUND_VERSION = 'v1.3.2' # version 1.3.2
|
10
10
|
VIDEO = 'video-2.zip'
|
11
11
|
VIDEO_VERSION = '2' # version 1.0.1
|
12
|
-
EXAMPLES = '1.
|
12
|
+
EXAMPLES = '1.3'.freeze
|
13
13
|
HOME_DIR = ENV['HOME']
|
14
14
|
MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
|
15
15
|
|
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: 2.3.
|
4
|
+
version: 2.3.4
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- monkstone
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -79,7 +79,7 @@ files:
|
|
79
79
|
- Rakefile
|
80
80
|
- bin/propane
|
81
81
|
- lib/PROCESSING_LICENSE.txt
|
82
|
-
- lib/core-3.3.
|
82
|
+
- lib/core-3.3.5.jar
|
83
83
|
- lib/export.txt
|
84
84
|
- lib/gluegen-rt-2.3.2-natives-linux-amd64.jar
|
85
85
|
- lib/gluegen-rt-2.3.2-natives-macosx-universal.jar
|
@@ -168,7 +168,7 @@ rubyforge_project:
|
|
168
168
|
rubygems_version: 2.5.1
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
|
-
summary: ruby wrapper for processing-3.3.
|
171
|
+
summary: ruby wrapper for processing-3.3.5 on MacOS and linux64 bit only for opengl
|
172
172
|
test_files:
|
173
173
|
- test/create_test.rb
|
174
174
|
- test/deglut_spec_test.rb
|