picrate 0.0.3-java → 0.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3356804d4e8a73be8e31daceea79e551d0874f3aeb4e4e62b12ab9c4b2dd49de
4
- data.tar.gz: 0a92a0e1a62969be5678c160701408c390fb67dd2bfeb0d3a57c6c95e68befa9
3
+ metadata.gz: 9d9cefa23e6fd0cffddc86caf55e4d60a557f3904fc0544e5c468563ad02cc9a
4
+ data.tar.gz: a192aedae3032f9849df1832d711832506b05b32e663ec7bf5f60c2140c1e1c2
5
5
  SHA512:
6
- metadata.gz: 791e4d54e4d1576ade00904c2d032ca0526a9245174f3d7a2ebb7ca1b84f5b99eb22b7c981564ed3f68790e9fe6cf21fbc00ab4bc1b2ef02daea49bc168188f5
7
- data.tar.gz: 922bf6e7884fd966fe2b631fe1f61fb4b61ea4b9327643c365ab1d7d259fe3b95afd4fe7b182720d113a85e53a1a5f74560f9cfc36a64b0af01ac84279b389d4
6
+ metadata.gz: 15017e043ffb30a061733acc42f1bd2383d2d48a21195aad8b6bc3906d1b935b8cfecbe8fce997e19d62cd7e10e6b6e5d5f7440f7dcfd226d36e6cc0901eb070
7
+ data.tar.gz: 3f34d10a86fa438af18fdabf9d7b7eceeb914e15c2ae0d6621bea2d6e49d72a0b248386a5e337db40543143a57dcf33fc13da0c46cc259945410690e69612e05
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- v0.0.1
2
- First iteration with drivers as used by processing.org
1
+ v0.1.0.pre
2
+ Hack to get library loader to work (will need revision), convert P2D samples to JAVA2D until opengl issue fixed
3
+ v0.0.3
4
+ Extended Samples
3
5
  v0.0.2
4
6
  Attempt to set native folder for armv6hf
7
+ v0.0.1
8
+ First iteration with drivers as used by processing.org
data/README.md CHANGED
@@ -2,18 +2,18 @@ __C6H3N3O7__ [![Build Status](https://travis-ci.org/ruby-processing/PiCrate.svg?
2
2
  [![Gem Version](https://badge.fury.io/rb/picrate.svg)](https://badge.fury.io/rb/picrate)
3
3
 
4
4
  # PiCrate
5
- Create processing sketches in ruby on raspberry-pi and linux (this project is a parallel development of [picrate][picrate] targetting the raspberry-pi, but will initially be developed on a regular linux box). The aim is to produce a gem installable app that can be run with jruby, with minimal dependencies.
5
+ Create processing sketches in ruby on raspberry-pi and linux (this project is a parallel development of [propane][propane] targetting the raspberry-pi, but will initially be developed on a regular linux box). The aim is to produce a gem installable app that can be run with jruby, with minimal dependencies. Drop the `C` and you get pirate, or and an `e` and get `PiCreate`, a happy coincidence?
6
6
 
7
7
  ### To Build and Test ###
8
8
 
9
9
  Clone this repo:-
10
10
 
11
- Requires maven, jdk8 (can be openjdk), and a jruby install.
11
+ Requires maven, [jdk8][oracle] (but could be openjdk), and a jruby install.
12
12
 
13
13
  ```bash
14
14
  cd PiCrate
15
15
  rake
16
- jgem install picrate-0.0.2-java.gem
16
+ jgem install picrate-0.0.3-java.gem
17
17
  ```
18
18
  To create a template sketch:-
19
19
  ```bash
@@ -49,4 +49,5 @@ jruby my_sketch.rb
49
49
  ```
50
50
 
51
51
 
52
- [picrate]:https://ruby-processing.github.io/picrate/
52
+ [propane]:https://ruby-processing.github.io/propane/
53
+ [oracle]:http://www.rpiblog.com/2014/03/installing-oracle-jdk-8-on-raspberry-pi.html
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ end
21
21
  desc 'Install'
22
22
  task :install do
23
23
  sh 'mvn dependency:copy'
24
- sh 'mv target/picrate-0.0.3.jar lib'
24
+ sh 'mv target/picrate-0.1.0.jar lib'
25
25
  end
26
26
 
27
27
  desc 'Gem'
@@ -29,7 +29,7 @@ end
29
29
 
30
30
  Sketch.new
31
31
  ```
32
- You should be aware that all vanilla processing sketches are similary wrapped prior to java compilation. The idea of processing and also propane is to make it easy to create sketches, so this is all you need to know, and you should probably look at [propane][propane] if you really prefer class wrapped sketches.
32
+ You should be aware that all vanilla processing sketches are similarly wrapped prior to java compilation. The idea of processing and also PiCrate is to make it easy to create sketches, so this is all you need to know, and you should probably look at [propane][propane] if you really prefer class wrapped sketches.
33
33
 
34
34
  For propane see also [Processing][processing] module for more details, you could also see [magic][magic] (_but it 'really' is not necessary_)
35
35
 
@@ -6,7 +6,7 @@ permalink: /classes/arcball/
6
6
 
7
7
  ArcBall is a user input interface to make a 3D object rotate in an intuitive way. It uses quaternions to represent orientations, although this implementation detail is hidden in propane. Use the ArcBall to enable mouse drag rotation and mouse wheel zoom in 3D sketches. Hold down x, y or z keys to constrain the rotation axis.
8
8
 
9
- See a simple example below, where the box (a cube in this case) gets centered in the middle of the display.
9
+ See a simple example below, where the box (a cube in this case) gets centered in the middle of the display.
10
10
 
11
11
  ```ruby
12
12
  def setup
@@ -16,7 +16,7 @@ def setup
16
16
  end
17
17
 
18
18
  def draw
19
- background 50
19
+ background 50
20
20
  box 300, 300, 300
21
21
  end
22
22
 
@@ -28,6 +28,6 @@ end
28
28
 
29
29
  Alternative Examples: [3D Menger][menger], [Retained Shape][shape], [Constrained ArcBall][constrain]
30
30
 
31
- [menger]: https://github.com/ruby-processing/picrate-examples/blob/master/library/vecmath/vec3d/retained_menger.rb
32
- [shape]: https://github.com/ruby-processing/picrate-examples/blob/master/library/vecmath/arcball/arcball_shape.rb
33
- [constrain]: https://github.com/ruby-processing/picrate-examples/blob/master/library/vecmath/arcball/constrain.rb
31
+ [menger]: https://github.com/ruby-processing/picrate-examples/blob/library/vecmath/vec3d/retained_menger.rb
32
+ [shape]: https://github.com/ruby-processing/picrate-examples/blob/library/vecmath/arcball/arcball_shape.rb
33
+ [constrain]: https://github.com/ruby-processing/picrate-examples/blob/library/vecmath/arcball/constrain.rb
@@ -10,9 +10,9 @@ A native file chooser for propane, bases around vanilla processing `selectInput`
10
10
 
11
11
  First load the `chooser` library, this creates the interface:-
12
12
 
13
- `public void file_selected(java.io.File selected);`
13
+ `public void file_selected(java.io.File selected);`
14
14
 
15
- which you need to define in your sketch, to make use the `selected` file. This sketch makes use of the propane method `resizable` (vanilla processing `surface.setResizable(true)`) so that we can change sketch size to match our `image`. Note we need to guard against `img` being `nil` or sketch will crash. You may change the the prompt `select an image` in `select_input` but you cannot change `file_selected` which is hard-wired to cope with java reflection.
15
+ which you need to define in your sketch, to make use the `selected` file. This sketch makes use of the propane method `resizable` (vanilla processing `surface.setResizable(true)`) so that we can change sketch size to match our `image`. Note we need to guard against `img` being `nil` or sketch will crash. You may change the the prompt `select an image` in `select_input` but you cannot change `file_selected` which is hard-wired to cope with java reflection.
16
16
 
17
17
  ### example sketch ###
18
18
  ```ruby
@@ -53,4 +53,4 @@ end
53
53
 
54
54
  See more [examples here][examples]
55
55
 
56
- [examples]:https://github.com/ruby-processing/picrate-examples/tree/master/processing_app/library/file_chooser
56
+ [examples]:https://github.com/ruby-processing/picrate-examples/tree/processing_app/library/file_chooser
data/docs/_config.yml CHANGED
@@ -42,6 +42,9 @@ collections:
42
42
  libraries:
43
43
  output: true
44
44
  permalink: /libraries/index.html
45
+ live:
46
+ output: true
47
+ permalink: /live/index.html
45
48
  modules:
46
49
  output: true
47
50
  permalink: /modules/index.html
@@ -4,7 +4,7 @@ title: "picrate<sup>1, 2</sup>"
4
4
  keywords: library, boids, control_panel
5
5
  permalink: libraries/picrate.html
6
6
  ---
7
- Propane provides a number of libraries that you can use _out of the box_, but which still need to be loaded to use them in you sketches see examples below:-
7
+ PiCrate provides a number of libraries that you can use _out of the box_, but which still need to be loaded to use them in you sketches see examples below:-
8
8
 
9
9
 
10
10
  ### Boids library ###
@@ -232,7 +232,7 @@ Here is the re-factored Flight Patterns Sketch:-
232
232
  #!/usr/bin/env jruby -v -w
233
233
  # Description:
234
234
  # Flight Patterns is that ol' Euruko 2008 demo.
235
- # Reworked version for Propane
235
+ # Reworked version for PiCrate
236
236
  # Usage:
237
237
  # Drag mouse to steer 'invisible' flock attractor, use 'f' key to toggle flee
238
238
  # Mouse 'click' to toggle 'sphere' or 'circle' display
@@ -311,7 +311,7 @@ Start by loading in the control_panel library, and then define your panel in set
311
311
  #!/usr/bin/env jruby -v -W2
312
312
  # frozen_string_literal: true
313
313
  require 'picrate'
314
- # Iconic ruby-processing example for Propane
314
+ # Iconic ruby-processing example for PiCrate
315
315
  class JWishy < Processing::App
316
316
  load_library :control_panel
317
317
 
@@ -0,0 +1,17 @@
1
+ ---
2
+ layout: post
3
+ title: "jirb"
4
+ keywords: ruby, java, jruby
5
+ permalink: live/jirb.html
6
+ ---
7
+ ### Live coding with jirb ###
8
+
9
+ The easiest way to start is to created a template sketch eg `picrate -c fred 200 200`
10
+
11
+ Fire up the jirb console then at irb prompt:-
12
+
13
+ ```bash
14
+ load 'fred_sketch.rb'
15
+ ```
16
+
17
+ ![irb]({{ site.github.url }}/assets/irb.png)
@@ -0,0 +1,84 @@
1
+ ---
2
+ layout: post
3
+ title: "pry"
4
+ keywords: ruby, java, jruby
5
+ permalink: live/pry.html
6
+ ---
7
+ ### Live coding with pry and vim ###
8
+
9
+ First you will need to `jgem install pry`
10
+
11
+ Easy use configuration in your `~/.bashrc` (many linux distros) or `~/.profile`
12
+
13
+ ```bash
14
+ alias jpry="jruby -e \"require 'pry'; binding.pry\""
15
+ ```
16
+ Then firing up pry with jruby is as simple as
17
+
18
+ ```bash
19
+ jpry
20
+ ```
21
+ The easiest way to start is to created a template sketch eg `picrate -c fred 200 200`
22
+
23
+ For live editing with vim (there is is an emacs alternative see [pry wiki][prywiki])
24
+
25
+ You should also create or edit `~/.pryrc` to set the live editor
26
+
27
+ ```bash
28
+ Pry.config.editor = 'vim'
29
+ ```
30
+ Fire up the pry console then at pry prompt:-
31
+
32
+ ```bash
33
+ load 'fred_sketch.rb'
34
+ fred = FredSketch.new
35
+ edit FredSketch
36
+ ```
37
+ Screen shot on edit from pry
38
+
39
+ ![pry]({{ site.github.url }}/assets/edit_vim.png)
40
+
41
+ Screen shot on `:wq` from vim
42
+
43
+ ![pry]({{ site.github.url }}/assets/vim_save.png)
44
+
45
+ Or if you just wanted to edit the draw loop
46
+
47
+ `edit -p FredSketch#draw`
48
+
49
+ [prywiki]:https://github.com/pry/pry/wiki/Customization-and-configuration
50
+
51
+ But there's much more you can use the pry console for, like regular ruby you can look up methods constants etc:-
52
+
53
+ ```ruby
54
+ require 'picrate'
55
+ # => true
56
+ Java::ProcessingCore::PConstants.constants
57
+ # => [:PATH,
58
+ # :DISABLE_TEXTURE_MIPMAPS,
59
+ # :POLYGON,
60
+ # :POSTERIZE,
61
+ # :ENABLE_DEPTH_TEST,
62
+ # :TEXT,
63
+ # :BOTTOM,
64
+ # :CLOSE,
65
+ # :MIN_INT,
66
+ # ...]
67
+ Java::ProcessingCore::PConstants::P3D
68
+ # => "processing.opengl.PGraphics3D"
69
+ Java::ProcessingCore::PApplet.methods
70
+ # [:create_reader,
71
+ # :year,
72
+ # :java_method,
73
+ # :degrees,
74
+ # :blend_color,
75
+ # :show_variation_warning,
76
+ # :runSketch,
77
+ # :lerpColor,
78
+ # :shorten,
79
+ # :trim,
80
+ # :sqrt,
81
+ # :calcSketchPath,
82
+ # ...]
83
+ # Note snake case methods, also not all the methods will be useful in `PiCrate`
84
+ ```
@@ -4,7 +4,7 @@ title: "Custom"
4
4
  keywords: using, module
5
5
  permalink: modules/custom.html
6
6
  ---
7
- Ruby users will be familiar with the use of modules, but may not be aware that they can be of particular use in propane (and jruby generally)
7
+ Ruby users will be familiar with the use of modules, but may not be aware that they can be of particular use in PiCrate (and jruby generally)
8
8
 
9
9
  ### Namespace to wrap java packages ###
10
10
 
@@ -33,9 +33,9 @@ end
33
33
 
34
34
  Now you can prefix the desired Java Class name with `JavaLangDemo::` to access the included class
35
35
 
36
- __Example__: Simpler form available in a propane sketch
36
+ __Example__: Simpler form available in a PiCrate sketch
37
37
 
38
- But we have made this even easier for you because since we wrap the processing sketch in a `Processing` module so you are able to just use `include_package` in your propane sketches. See below
38
+ But we have made this even easier for you because since we wrap the processing sketch in a `Processing` module so you are able to just use `include_package` in your PiCrate sketches. See below
39
39
  example where include several `ddf.minim` packages in a sketch:-
40
40
 
41
41
  ```ruby
@@ -4,7 +4,7 @@ title: "Propane::HelperMethods"
4
4
  keywords: Propane, module
5
5
  permalink: modules/helper_methods.html
6
6
  ---
7
- The [HelperMethods][HelperMethods] module provides additional methods to the propane sketch.
7
+ The [HelperMethods][HelperMethods] module provides additional methods to the PiCrate sketch.
8
8
 
9
9
 
10
- [HelperMethods]:https://github.com/ruby-processing/propane/blob/master/lib/propane/helper_methods.rb
10
+ [HelperMethods]:https://github.com/ruby-processing/PiCrate/blob/master/lib/picrate/helper_methods.rb
@@ -22,7 +22,7 @@ Now we know this is not `kosher` and as you get more comfortable with propane yo
22
22
 
23
23
  The hair shirted brigade might want to take a look at `forwardable` and make their classes `extend Forwardable` instead. There are some examples include with the samples see the [revolute_joint][joint] pbox2d example with the [Windmill][Windmill] and [ParticleSystem][ParticleSystem] classes for example.
24
24
 
25
- [joint]:https://github.com/ruby-processing/picrate-examples/blob/master/examples/forwardable_module_examples/pbox2d/revolute_joint/revolute_joint.rb
26
- [Windmill]:https://github.com/ruby-processing/picrate-examples/blob/master/examples/forwardable_module_examples/pbox2d/revolute_joint/library/revolute_joint/lib/windmill.rb
27
- [ParticleSystem]:https://github.com/ruby-processing/picrate-examples/blob/master/examples/forwardable_module_examples/pbox2d/revolute_joint/library/revolute_joint/lib/particle_system.rb
25
+ [joint]:https://github.com/ruby-processing/picrate-examples/blob/examples/forwardable_module_examples/pbox2d/revolute_joint/revolute_joint.rb
26
+ [Windmill]:https://github.com/ruby-processing/picrate-examples/blob/examples/forwardable_module_examples/pbox2d/revolute_joint/master/library/revolute_joint/lib/windmill.rb
27
+ [ParticleSystem]:https://github.com/ruby-processing/picrate-examples/blob/examples/forwardable_module_examples/pbox2d/revolute_joint/revolute_joint/lib/particle_system.rb
28
28
  [inner]: {{ site.github.url }}/magic/java
@@ -42,7 +42,7 @@ class Tree < Processing::App
42
42
  Tree.new
43
43
  ```
44
44
 
45
- For a variable that gets called quite a lot in a propane sketch it makes sense to create a getter using `attr_reader`. This has the fortunate side effect of making it blindingly obvious when you are assigning it to a new value/instance (it also makes the sketch variable readable by external classes).
45
+ For a variable that gets called quite a lot in a PiCrate sketch it makes sense to create a getter using `attr_reader`. This has the fortunate side effect of making it blindingly obvious when you are assigning it to a new value/instance (it also makes the sketch variable readable by external classes).
46
46
 
47
47
  ```ruby
48
48
  #!/usr/bin/env jruby -w
@@ -29,7 +29,7 @@ A rational number can be represented as a paired integer number; `a/b` (b>0). Wh
29
29
 
30
30
  ### PiCrate ###
31
31
 
32
- We have re-opened the `Numeric` class to implement `radians` and `degree` methods, which means that instead of using `radians(x)` a processing method, you should use `x.radians` in propane. But this should not be so necessary now we have `DegLut.cos` and `DegLut.sin` methods.
32
+ We have re-opened the `Numeric` class to implement `radians` and `degree` methods, which means that instead of using `radians(x)` a processing method, you should use `x.radians` in PiCrate. But this should not be so necessary now we have `DegLut.cos` and `DegLut.sin` methods.
33
33
 
34
34
  [float]:https://ruby-doc.org/core-2.2.0/Float.html
35
35
  [fixnum]:https://ruby-doc.org/core-2.2.0/Fixnum.html
@@ -3,12 +3,17 @@ layout: post
3
3
  title: "Getting Started"
4
4
  date: 2018-05-24 07:34:13
5
5
  categories: PiCrate update
6
+ permalink: /getting/
6
7
  ---
7
- You need to install jdk8, there's probably easy ways to do it, if you have more that one version of java installed you could use `update-alternatives` tool to control them.
8
- Then install JRuby.
8
+ The current version of raspbian installs jdk-1.8.0_65-bi17 (hard float) and that is just fine, if you have more that one version of java installed you could use `update-alternatives` tool to control them.
9
+
10
+ Then install JRuby see [jruby][jruby].
11
+
12
+ There is something wrong with jgem install from rubygems (involving `flock` and possibly wrong bit) so currently the best approach is to download the gems and install locally
9
13
 
10
14
  ```bash
11
- jgem install picrate # also installs arcball dependency
15
+ jgem install arcball-1.0.1-java.gem
16
+ jgem install picrate-0.0.3-java.gem
12
17
  ```
13
18
 
14
19
  Install samples
@@ -66,3 +71,9 @@ jruby my_sketch.rb
66
71
  ```
67
72
 
68
73
  Or even `chmod +x my_sketch.rb` to make an executable script.
74
+
75
+ ### Circle Collision Sketch Running on RaspberryPI
76
+
77
+ ![circle_collisions]({{ site.github.url }}/assets/circle_collisions.png)
78
+
79
+ [jruby]:{{ site.github.url }}/install_jruby/
@@ -3,8 +3,9 @@ layout: post
3
3
  title: "Installing JRuby"
4
4
  date: 2018-05-24 07:34:13
5
5
  categories: PiCrate update
6
+ permalink: /install_jruby/
6
7
  ---
7
- Pure installation Debian linux (should work raspbian) no need for `rbenv` or `rvm`
8
+ Pure installation on raspbian no need for `rbenv` or `rvm`
8
9
 
9
10
  Get the latest version from [http://jruby.org/download][download]
10
11
 
@@ -24,7 +25,7 @@ You should prefer to install gems locally (no need for sudo). To do that it is c
24
25
 
25
26
  ```bash
26
27
  alias jpry="jruby -e \"require 'pry'; binding.pry\""
27
- export JAVA_HOME="/opt/jdk1.8.0_151" # if using oracle java openjdk-8 is fine though
28
+ # export JAVA_HOME="/opt/jdk1.8.0_151" # if using oracle java openjdk-8 is fine though
28
29
  export GEM_HOME="/home/tux/.gem/ruby/2.3.0"
29
30
  export GEM_PATH="/home/tux/.gem/ruby/2.3.0"
30
31
  export PATH="${PATH}:${GEM_PATH}/bin"
data/docs/about.md CHANGED
@@ -4,7 +4,7 @@ title: About
4
4
  permalink: /about/
5
5
  ---
6
6
 
7
- PiCrate is an experimental ruby wrapper for processing for the raspberrypi (raspbian image), like the vanilla processing version this uses the 32 bit video drivers. It could be that 64 bit drivers work, but is possible they don't play too well together (to use the 64 bit drivers uncomment them in Rakefile and gemspec and comment out the 32 bit drivers). Also `native_folder.rb` will need amending for sound etc libraries.
7
+ PiCrate is an experimental ruby wrapper for processing for the raspberrypi (raspbian image), like the vanilla processing version this uses the 32 bit video drivers. It could be that 64 bit drivers work, but is possible they don't play too well together (to use the 64 bit drivers uncomment them in Rakefile and gemspec and comment out the 32 bit drivers). Also `native_folder.rb` will need amending for sound etc libraries see also [pi.processing.org libraries][libraries].
8
8
  See [github repo][repo]
9
9
 
10
10
  See also [gottfreid haider][gottfreid] at vanilla processing and vanilla [processing wiki][wiki]
@@ -14,3 +14,4 @@ See also [gottfreid haider][gottfreid] at vanilla processing and vanilla [proces
14
14
  [repo]:https://github.com/ruby-processing/PiCrate
15
15
  [gottfreid]:https://github.com/processing/processing/wiki/Raspberry-Pi#download
16
16
  [wiki]:https://github.com/processing/processing/wiki/Raspberry-Pi
17
+ [libraries]:https://pi.processing.org/libraries.html
Binary file
data/docs/live.md ADDED
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: page
3
+ title: Live
4
+ ---
5
+ Spoiler alert, initially a least it is better just to accept the live works...
6
+
7
+ {% for live_mode in site.live %}
8
+ <h2>{{ item.title }}</h2>
9
+ <p>{{ item.description }}</p>
10
+ <p><h2><a href="{{ live_mode.url | prepend: site.github.url }}">{{ live_mode.title }}</a></h2></p>
11
+ {% endfor %}
@@ -1,35 +1,28 @@
1
1
  require 'rbconfig'
2
2
 
3
3
  # Utility to load native binaries on Java CLASSPATH
4
+ #HACK until jruby returns a more specific 'host_os' than 'linux'
4
5
  class NativeFolder
5
6
  attr_reader :os, :bit
6
7
 
7
- WIN_FORMAT = 'windows%d'.freeze
8
- LINUX_FORMAT = 'linux%d'.freeze
8
+ LINUX_FORMAT = 'linux%s'.freeze
9
9
  ARM32 = '-armv6hf'.freeze
10
- ARM64 = '-aarch64'.freeze
11
- # WIN_PATTERNS = [
12
- # /bccwin/i,
13
- # /cygwin/i,
14
- # /djgpp/i,
15
- # /ming/i,
16
- # /mswin/i,
17
- # /wince/i
18
- # ].freeze
10
+ # ARM64 = '-aarch64'.freeze
19
11
 
20
12
  def initialize
21
13
  @os = RbConfig::CONFIG['host_os'].downcase
22
- @bit = java.lang.System.get_property('os.arch') =~ /64/ ? 64 : 32
14
+ @bit = java.lang.System.get_property('os.arch')
23
15
  end
24
16
 
25
17
  def name
26
- return 'macosx' if os =~ /darwin/ || os =~ /mac/
27
- return format(LINUX_FORMAT, ARM32) if os =~ /^arm/
28
- return format(LINUX_FORMAT, bit) if os =~ /linux/
18
+ if /linux/.match?(os)
19
+ return format(LINUX_FORMAT, '64') if /amd64/.match?(bit)
20
+ return format(LINUX_FORMAT, ARM32) if /arm/.match?(bit)
21
+ end
22
+ raise RuntimeError, "Unsupported Archicture"
29
23
  end
30
24
 
31
25
  def extension
32
- return '*.so' if os =~ /linux/
33
- '*.dylib' # MacOS
26
+ '*.so'
34
27
  end
35
28
  end
@@ -35,7 +35,7 @@ module Processing
35
35
 
36
36
  # Define the options, and what they do
37
37
  options[:version] = false
38
- opts.on('-v', '--version', 'Processing Version') do
38
+ opts.on('-v', '--version', 'PiCrate Version') do
39
39
  options[:version] = true
40
40
  end
41
41
 
@@ -68,7 +68,7 @@ module Processing
68
68
 
69
69
  def show_version
70
70
  v_format = "Processing version %s\nJRuby version %s"
71
- puts format(v_format, Processing::VERSION, JRUBY_VERSION)
71
+ puts format(v_format, PiCrate::VERSION, JRUBY_VERSION)
72
72
  end
73
73
 
74
74
  def install(library)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module PiCrate
3
- VERSION = '0.0.3'.freeze
3
+ VERSION = '0.1.0'.freeze
4
4
  end
data/picrate.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.summary = %q{ruby wrapper for processing-3.3.7 on raspberrypi and linux64}
16
16
  gem.homepage = 'https://ruby-processing.github.io/PiCrate/'
17
17
  gem.files = `git ls-files`.split($/)
18
- gem.files << 'lib/picrate-0.0.3.jar'
18
+ gem.files << 'lib/picrate-0.1.0.jar'
19
19
  gem.files << 'lib/gluegen-rt-2.3.2.jar'
20
20
  gem.files << 'lib/jogl-all-2.3.2.jar'
21
21
  gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-amd64.jar'
data/pom.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  project 'picrate', 'http://maven.apache.org' do
2
2
 
3
3
  model_version '4.0.0'
4
- id 'ruby-processing:picrate:0.0.3'
4
+ id 'ruby-processing:picrate:0.1.0'
5
5
  packaging 'jar'
6
6
 
7
7
  description 'An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.'
data/pom.xml CHANGED
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
11
11
  <modelVersion>4.0.0</modelVersion>
12
12
  <groupId>ruby-processing</groupId>
13
13
  <artifactId>picrate</artifactId>
14
- <version>0.0.3</version>
14
+ <version>0.1.0</version>
15
15
  <name>picrate</name>
16
16
  <description>An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.</description>
17
17
  <url>http://maven.apache.org</url>
data/vendors/Rakefile CHANGED
@@ -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 = '0.0.3'.freeze
13
+ EXAMPLES = '0.0.4'.freeze
14
14
  HOME_DIR = ENV['HOME']
15
15
  PI_OR_LINUX = /linux|arm/ =~ RbConfig::CONFIG['host_os']
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: java
6
6
  authors:
7
7
  - monkstone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-12 00:00:00.000000000 Z
11
+ date: 2018-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -109,6 +109,8 @@ files:
109
109
  - docs/_libraries/picrate.md
110
110
  - docs/_libraries/processing.md
111
111
  - docs/_libraries/vector_utils.md
112
+ - docs/_live/jirb/jirb.md
113
+ - docs/_live/pry/pry.md
112
114
  - docs/_magic/java.md
113
115
  - docs/_magic/jruby.md
114
116
  - docs/_magic/processing.md
@@ -144,6 +146,7 @@ files:
144
146
  - docs/_sass/_layout.scss
145
147
  - docs/_sass/_syntax-highlighting.scss
146
148
  - docs/about.md
149
+ - docs/assets/circle_collisions.png
147
150
  - docs/classes.md
148
151
  - docs/css/main.scss
149
152
  - docs/editors.md
@@ -152,6 +155,7 @@ files:
152
155
  - docs/gems.md
153
156
  - docs/index.html
154
157
  - docs/libraries.md
158
+ - docs/live.md
155
159
  - docs/magic.md
156
160
  - docs/methods.md
157
161
  - docs/modules.md
@@ -162,7 +166,7 @@ files:
162
166
  - lib/jogl-all-2.3.2-natives-linux-amd64.jar
163
167
  - lib/jogl-all-2.3.2-natives-linux-armv6hf.jar
164
168
  - lib/jogl-all-2.3.2.jar
165
- - lib/picrate-0.0.3.jar
169
+ - lib/picrate-0.1.0.jar
166
170
  - lib/picrate.rb
167
171
  - lib/picrate/app.rb
168
172
  - lib/picrate/creators/sketch_class.rb