picrate 2.1.1-java → 2.4.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/extensions.xml +1 -1
  3. data/.mvn/wrapper/MavenWrapperDownloader.java +1 -1
  4. data/.mvn/wrapper/maven-wrapper.properties +2 -2
  5. data/CHANGELOG.md +11 -1
  6. data/README.md +3 -2
  7. data/Rakefile +2 -1
  8. data/docs/_includes/footer.html +1 -1
  9. data/docs/_layouts/post.html +1 -1
  10. data/docs/_methods/noise_mode.md +88 -0
  11. data/docs/_posts/2018-05-06-install_jruby.md +3 -3
  12. data/docs/_posts/2018-11-18-building-gem.md +3 -1
  13. data/docs/_posts/2020-05-11-getting_started_manjaro.md +19 -7
  14. data/docs/classes.md +2 -2
  15. data/docs/editors.md +2 -2
  16. data/docs/gems.md +3 -3
  17. data/docs/index.html +1 -1
  18. data/docs/libraries.md +2 -2
  19. data/docs/live.md +2 -2
  20. data/docs/magic.md +2 -2
  21. data/docs/methods.md +2 -2
  22. data/docs/modules.md +3 -3
  23. data/docs/objects.md +2 -2
  24. data/lib/picrate.rb +2 -1
  25. data/lib/picrate/app.rb +3 -2
  26. data/lib/picrate/helper_methods.rb +1 -1
  27. data/lib/picrate/native_folder.rb +1 -3
  28. data/lib/picrate/runner.rb +4 -4
  29. data/lib/picrate/version.rb +1 -1
  30. data/library/jcomplex/jcomplex.rb +1 -0
  31. data/library/pdf/pdf.rb +7 -0
  32. data/library/svg/svg.rb +7 -0
  33. data/mvnw +2 -2
  34. data/mvnw.cmd +2 -2
  35. data/picrate.gemspec +5 -3
  36. data/pom.rb +31 -9
  37. data/pom.xml +41 -6
  38. data/src/main/java/monkstone/FastNoiseModuleJava.java +127 -0
  39. data/src/main/java/monkstone/PicrateLibrary.java +3 -1
  40. data/src/main/java/monkstone/SmoothNoiseModuleJava.java +127 -0
  41. data/src/main/java/monkstone/complex/JComplex.java +252 -0
  42. data/src/main/java/monkstone/fastmath/DegLutTables.java +111 -0
  43. data/src/main/java/monkstone/fastmath/Deglut.java +41 -93
  44. data/src/main/java/monkstone/noise/OpenSimplex2F.java +914 -0
  45. data/src/main/java/monkstone/noise/OpenSimplex2S.java +1138 -0
  46. data/src/main/java/monkstone/vecmath/package-info.java +1 -1
  47. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
  48. data/src/main/java/monkstone/videoevent/package-info.java +1 -1
  49. data/src/main/java/processing/awt/ShimAWT.java +260 -94
  50. data/src/main/java/processing/core/PApplet.java +14664 -13450
  51. data/src/main/java/processing/core/PConstants.java +5 -5
  52. data/src/main/java/processing/core/PFont.java +1 -1
  53. data/src/main/java/processing/core/PGraphics.java +200 -201
  54. data/src/main/java/processing/core/PImage.java +539 -549
  55. data/src/main/java/processing/core/PShape.java +18 -18
  56. data/src/main/java/processing/core/PVector.java +23 -23
  57. data/src/main/java/processing/data/Table.java +4 -4
  58. data/src/main/java/processing/net/Client.java +13 -13
  59. data/src/main/java/processing/net/Server.java +5 -5
  60. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +4 -4
  61. data/src/main/java/processing/pdf/PGraphicsPDF.java +529 -0
  62. data/src/main/java/processing/svg/PGraphicsSVG.java +378 -0
  63. data/test/deglut_spec_test.rb +2 -2
  64. data/test/respond_to_test.rb +0 -2
  65. data/vendors/Rakefile +31 -22
  66. data/vendors/geany.rb +3 -3
  67. metadata +26 -13
  68. data/src/main/java/monkstone/noise/SimplexNoise.java +0 -465
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d75664876e56bfb68eb317371315aa6eb989d714f0ca9421c997fded6013f92e
4
- data.tar.gz: 0ed6af00f023c0d5d447cdf19e94001343f64b335e28b0037029368aed84705a
3
+ metadata.gz: cecab16a0e1abbcc010dc18037cba16121861f942a95aff9a898f9a5af4582ef
4
+ data.tar.gz: 3990c04c7008c66b54cf1af01d81980b7037ede67f6579bebb1294dd503a0260
5
5
  SHA512:
6
- metadata.gz: 6369280804b285a714f9fb8cb9dac9dd70cb46d0b6d0aa66a9e3dc63d06cf3425be9cb0bf1143f5ed81f2e4823790ddba517eeb2ab852567f5f1eded80471e96
7
- data.tar.gz: ace654cbd577df5fab79afcddafbb67a1c19aca7beb4c19fec8a3db01bf06bc308ba35107febb9122d320ff3bb7b6779ecdd1885089b9dde196825f6802fe0cf
6
+ metadata.gz: e365629d95d9077838b5a65300144fb817022dbfb21eda3754903f41aa29d39345986bc90d24021b9b1776f4f6b28206cab68ebda35f199502dcfe8a8ea1d8c0
7
+ data.tar.gz: 214a0c654b63653da787cf5afbd762420e3d6ae5d2e8ac9563b3b927ead5b7f3d10d7b63061cc1dea364511d3f39527296e2653e54dcd177cb87813666332210
data/.mvn/extensions.xml CHANGED
@@ -3,7 +3,7 @@
3
3
  <extension>
4
4
  <groupId>io.takari.polyglot</groupId>
5
5
  <artifactId>polyglot-ruby</artifactId>
6
- <version>0.4.3
6
+ <version>0.4.6
7
7
  </version>
8
8
  </extension>
9
9
  </extensions>
@@ -20,7 +20,7 @@ import java.util.Properties;
20
20
 
21
21
  public class MavenWrapperDownloader {
22
22
 
23
- private static final String WRAPPER_VERSION = "0.5.5";
23
+ private static final String WRAPPER_VERSION = "0.5.6";
24
24
  /**
25
25
  * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
26
26
  */
@@ -1,2 +1,2 @@
1
- distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
2
- wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
1
+ distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2
+ wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
data/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
- v2.1.1 Bump to JRuby-9.2.13.0, include examples using ruby `clamp` in place of processing `constrain`.
1
+ v2.4.1 patch library loader, add PGS library examples.
2
+
3
+ v2.4.0 Refactor noise to two modules, FastNoise (default) & SmoothNoise, with terrain noise `:tnoise` option.
4
+
5
+ v2.3.0 Abandon Processing Value Noise in favour of OpenSimplex2, with choosable options. Added pdf library using iText5.
6
+
7
+ v2.2.0 Bump to latest JOGL-rc January 2021
8
+
9
+ v2.1.2 Bump to JRuby-9.2.14.0
10
+
11
+ v2.1.1 Bump to JRuby-9.2.13.0, include examples using ruby `clamp` in place of processing `constrain`, update to video-2.0 release, add run instruction to help
2
12
 
3
13
  v2.1.0 Refactor how we configure geany so we can use ENV['HOME'] rather hard code config file. Bump to JRuby-9.2.12.0, include Sam Pottingers July 2020 staging changes.
4
14
 
data/README.md CHANGED
@@ -14,12 +14,12 @@ jgem install picrate
14
14
 
15
15
  Clone main branch:-
16
16
 
17
- Requires java to build (and jogl-2.4.0-rc jars), but uses a maven wrapper so you don't need to install maven. Suggest build/test on regular linux box, but is designed for use on both RaspberryPI 3B+ and RaspberryPI4. Needs installed jruby to test/run.
17
+ Requires java to build (and [jogl-2.4.0-rc jars][jogl_jars]), but uses a maven wrapper so you don't need to install maven. Suggest build/test on regular linux box, but is designed for use on both RaspberryPI 3B+ and RaspberryPI4. Needs installed jruby to test/run.
18
18
 
19
19
  ```bash
20
20
  cd PiCrate # or whatever you call it
21
21
  rake # assumes an installed version of vanilla processing
22
- jgem install picrate-2.1.1-java.gem
22
+ jgem install picrate-2.4.1-java.gem
23
23
 
24
24
  ```
25
25
  To create a template sketch:-
@@ -59,3 +59,4 @@ jruby --dev my_sketch.rb # --dev flag speeds start-up
59
59
  [propane]:https://ruby-processing.github.io/propane/
60
60
  [vim]:https://github.com/ruby-processing/PiCrate/blob/master/docs/_editors/vim.md
61
61
  [geany]:https://github.com/ruby-processing/PiCrate/blob/master/docs/_editors/geany.md
62
+ [jogl_jars]:https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20210111/jar/
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ task default: %i[init compile install test gem]
9
9
  # Currently depends on local jogl-2.4.0 jars on path ~/jogl24
10
10
  desc 'Copy Jars'
11
11
  task :init do
12
- jogl24 = File.join(HOME_DIR, 'jogl24')
12
+ jogl24 = File.join(HOME_DIR, 'jogl-2.4-rc2021011')
13
13
  opengl = Dir.entries(jogl24).grep(/amd64|armv6hf|aarch64/).select { |jar| jar =~ /linux/ }
14
14
  opengl.concat %w[jogl-all.jar gluegen-rt.jar]
15
15
  opengl.each do |gl|
@@ -19,6 +19,7 @@ end
19
19
 
20
20
  desc 'Install'
21
21
  task :install do
22
+ sh "mvn dependency:copy"
22
23
  FileUtils.mv "target/picrate-#{PiCrate::VERSION}.jar", 'lib'
23
24
  end
24
25
 
@@ -29,7 +29,7 @@
29
29
  </div>
30
30
 
31
31
  <div class="footer-col footer-col-3">
32
- <p>{{ site.description }}</p>
32
+ <p>{{ site.description }}
33
33
  </div>
34
34
  </div>
35
35
 
@@ -5,7 +5,7 @@ layout: default
5
5
 
6
6
  <header class="post-header">
7
7
  <h1 class="post-title">{{ page.title }}</h1>
8
- <p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
8
+ <p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}
9
9
  </header>
10
10
 
11
11
  <article class="post-content">
@@ -0,0 +1,88 @@
1
+ ---
2
+ layout: post
3
+ title: "noise_mode"
4
+ ---
5
+
6
+ ### Name ###
7
+
8
+ `noise_mode` _NB: not currently available in vanilla processing_.
9
+
10
+ ### Examples ###
11
+
12
+ ```ruby
13
+ #!/usr/bin/env jruby -w
14
+ require 'picrate'
15
+
16
+ class TestNoise < Processing::App
17
+ attr_reader :z
18
+
19
+ def setup
20
+ stroke(255, 64)
21
+ @z = 0
22
+ end
23
+
24
+ def draw
25
+ noise_scale = 0.01
26
+ background(0)
27
+ grid(width, height, 10, 10) do |x, y|
28
+ arrow(x, y, noise(x * noise_scale, y * noise_scale, z * noise_scale) * TWO_PI * 2)
29
+ end
30
+ @z += 1
31
+ end
32
+
33
+ def mouse_pressed
34
+ mode = NoiseMode::OPEN_SMOOTH # Smooth classic OpenSimplex2
35
+ noise_mode mode
36
+ sketch_title mode.description
37
+ end
38
+
39
+ def mouse_released
40
+ mode = NoiseMode::DEFAULT # Fast classic OpenSimplex2
41
+ noise_mode(mode)
42
+ sketch_title mode.description
43
+ end
44
+
45
+
46
+ def arrow(x, y, ang)
47
+ push_matrix()
48
+ translate(x, y)
49
+ rotate(ang)
50
+ line(0, 0, 20, 0)
51
+ translate(20, 0)
52
+ rotate(PI + 0.4)
53
+ line(0, 0, 5, 0)
54
+ rotate(-0.8)
55
+ line(0, 0, 5, 0)
56
+ pop_matrix()
57
+ end
58
+
59
+ def settings
60
+ size(600, 400, P2D)
61
+ end
62
+ end
63
+
64
+ TestNoise.new
65
+
66
+ ```
67
+
68
+ ### Description ###
69
+
70
+ Currently supports four implementations of noise:-
71
+ 1. DEFAULT # fast classic OpenSimplex2
72
+ 2. OPEN_SMOOTH # smoother class OpenSimplex2F
73
+ 3. FAST_TERRAIN # more suited to terrain
74
+ 4. SMOOTH_TERRAIN # as above but smoother
75
+
76
+ ### Syntax ###
77
+
78
+ ```ruby
79
+ noise_mode(mode) # default is NoiseMode::DEFAULT, a fast classic OpenSimplex2
80
+ ```
81
+
82
+ ### Related ###
83
+
84
+ `noise(x, y, z, w)`
85
+
86
+ `noise(x, y, z)`
87
+
88
+ `noise(x, y)`
@@ -14,7 +14,7 @@ Get the latest version from [http://jruby.org/download][download]
14
14
 
15
15
  ```bash
16
16
  cd /opt
17
- sudo tar xzvf /pathToDownload/jruby-bin-9.2.13.0.tar.gz
17
+ sudo tar xzvf /pathToDownload/jruby-bin-9.2.14.0.tar.gz
18
18
  ```
19
19
 
20
20
  Then use the excellent `update-alternatives` tool to provide symbolic links to `jruby`, `jgem`, `jirb` and `rake` especially if you haven't installed `mri` ruby.
@@ -38,9 +38,9 @@ export PATH="${PATH}:${GEM_PATH}/bin"
38
38
 
39
39
  ### Automated install using bash ###
40
40
 
41
- The [picrate2_install.sh][bash] script currently installs jruby-9.2.13.0 and picrate-2.1.1.
41
+ The [picrate2_install.sh][bash] script currently installs jruby-9.2.14.0 and picrate-2.2.0.
42
42
 
43
43
  If you know better please post on wiki
44
44
 
45
- [download]:"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.13.0/jruby-dist-9.2.13.0-bin.tar.gz"
45
+ [download]:"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.14.0/jruby-dist-9.2.14.0-bin.tar.gz"
46
46
  [bash]:https://gist.github.com/monkstone/6ae9840d7b7008c177b4a9f589d14ec6
@@ -6,7 +6,7 @@ categories: PiCrate update
6
6
  ---
7
7
  Requirements:-
8
8
 
9
- 1. Latest jogl-2.4.0-rc jars (place in ~/jogl24 folder).
9
+ 1. Latest jogl-2.4.0-rc jars (place in ~/jogl-2.4-rc2021011 folder see [jogl-jars][jars]).
10
10
 
11
11
  2. jdk-11+ and maven
12
12
 
@@ -16,3 +16,5 @@ git clone --depth 1 https://github.com/ruby-processing/PiCrate.git
16
16
  cd PiCrate
17
17
  rake # to build gem
18
18
  ```
19
+
20
+ [jars]:https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20210111/jar/
@@ -5,12 +5,20 @@ date: 2020-05-11 07:34:13
5
5
  categories: PiCrate update
6
6
  permalink: /getting_manjaro/
7
7
  ---
8
- Currently Manjaro does not come with a pre-installed java. So the first step is to install a `jdk` the distro version (jdk14) should work. Setting the JDK_HOME environment (easiest done `/etc/profile.d`) and then manually install the latest JRuby. It is probably worth creating a symbolic links to `/usr/bin/jruby` and `/usr/bin/jgem` from wherever you installed jruby eg /opt folder.
8
+ If Manjaro does not come with a pre-installed java, then the first step is to install a `jdk` the distro version (jdk14) should work.
9
9
 
10
10
  ```bash
11
- mkdir -p ~/.gem/ruby/2.5.0
11
+ sudo pacman -S jdk-openjdk # current distro version jdk14
12
12
  ```
13
+ You can also use pacman to install jruby
14
+ ```bash
15
+ sudo pacman -S jruby # current version jruby-9.2.14.0
16
+ ```
17
+ It is probably a good idea to create a local gem store (rather needing to use sudo to install gems)
13
18
 
19
+ ```bash
20
+ mkdir -p ~/.gem/ruby/2.5.0 # current MRI version supported by jruby
21
+ ```
14
22
  Now set your `GEM_HOME`, `GEM_PATH` and amend your `PATH` as follows:-
15
23
 
16
24
  ```bash
@@ -19,16 +27,20 @@ echo "export GEM_PATH=\"\${HOME}/.gem/ruby/${MRI_RUBY}\"" >> ~/.bashrc
19
27
  echo "export PATH=\"\${PATH}:\${GEM_PATH}/bin\"" >> ~/.bashrc
20
28
  source ~/.bashrc # to update environment without re-logging in
21
29
  ```
22
- Now should be ready to install `picrate` and other gems.
23
- Install a local version of rake:-
30
+ Now should be ready to install `picrate` and other gems. But speed up install time you should set `--no-document` option in ~/.gemrc
31
+
24
32
  ```bash
25
- jgem install rake
33
+ touch ~/.gemrc
34
+ echo "gem: --no-document" > ~/.gemrc
26
35
  ```
27
36
  To install latest picrate and its dependencies:-
28
37
 
29
38
  ```bash
30
39
  jgem install picrate
31
40
  ```
41
+
42
+ Geany is a good editor/ide for PiCrate on the RaspberryPI (install via pacman), but some may prefer vim. For geany you should edit/preferences/Terminal to `Execute programs in the VTE`.
43
+
32
44
  __For a first install:-__
33
45
 
34
46
  ```bash
@@ -37,7 +49,7 @@ picrate --install # no args, install samples and geany config
37
49
  picrate -i Samples # to omit geany config
38
50
  ```
39
51
 
40
- This installs example sketches in `~/projects/examples` and ties them into a `geany` project `examples.geany`. It should also be possible to run sketches from the `geany` ide. Sketches need to be run in VTE terminal on Manjaro ARM the terminal emulator, does not give access to local environment variables in the version of Geany supplied.
52
+ This installs example sketches in `~/projects/examples` and ties them into a `geany` project `examples.geany`. It should also be possible to run sketches from the `geany` ide. The geany config creates `picrate.rb` template sketch so you can create a new sketch with template.
41
53
 
42
54
  To create a template sketch from the command line:-
43
55
 
@@ -77,7 +89,7 @@ vim my_sketch.rb
77
89
  To run sketches from command line:-
78
90
 
79
91
  ```bash
80
- jruby my_sketch.rb
92
+ jruby --dev my_sketch.rb
81
93
  ```
82
94
 
83
95
  Or even `chmod +x my_sketch.rb` to make an executable script.
data/docs/classes.md CHANGED
@@ -5,6 +5,6 @@ title: Classes
5
5
 
6
6
  {% for class in site.classes %}
7
7
  <h2>{{ item.title }}</h2>
8
- <p>{{ item.description }}</p>
9
- <p><h2><a href="{{ class.url | prepend: site.github.url }}">{{ class.title }}</a></h2></p>
8
+ <p>{{ item.description }}
9
+ <p><h2><a href="{{ class.url | prepend: site.github.url }}">{{ class.title }}</a></h2>
10
10
  {% endfor %}
data/docs/editors.md CHANGED
@@ -5,6 +5,6 @@ title: Editors
5
5
 
6
6
  {% for editor in site.editors %}
7
7
  <h2>{{ item.title }}</h2>
8
- <p>{{ item.description }}</p>
9
- <p><h2><a href="{{ editor.url | prepend: site.github.url }}">{{ editor.title }}</a></h2></p>
8
+ <p>{{ item.description }}
9
+ <p><h2><a href="{{ editor.url | prepend: site.github.url }}">{{ editor.title }}</a></h2>
10
10
  {% endfor %}
data/docs/gems.md CHANGED
@@ -4,8 +4,8 @@ title: Gems
4
4
  ---
5
5
  {% for gem in site.gems %}
6
6
  <h2>{{ item.title }}</h2>
7
- <p>{{ item.description }}</p>
8
- <p><h2><a href="{{ gem.url | prepend: site.github.url }}">{{ gem.title }}</a></h2></p>
7
+ <p>{{ item.description }}
8
+ <p><h2><a href="{{ gem.url | prepend: site.github.url }}">{{ gem.title }}</a></h2>
9
9
  {% endfor %}
10
10
 
11
- <p>If you are new to ruby, see <a href="http://guides.rubygems.org/what-is-a-gem/">what is a gem here</a></p>
11
+ <p>If you are new to ruby, see <a href="http://guides.rubygems.org/what-is-a-gem/">what is a gem here</a>
data/docs/index.html CHANGED
@@ -23,6 +23,6 @@ layout: default
23
23
  {% endfor %}
24
24
  </ul>
25
25
 
26
- <p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.github.url }}">via RSS</a></p>
26
+ <p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.github.url }}">via RSS</a>
27
27
 
28
28
  </div>
data/docs/libraries.md CHANGED
@@ -6,8 +6,8 @@ It is possible to use vanilla <a href="https://www.processing.org/reference/libr
6
6
 
7
7
  {% for library in site.libraries %}
8
8
  <h2>{{ item.title }}</h2>
9
- <p>{{ item.description }}</p>
10
- <p><h2><a href="{{ library.url | prepend: site.github.url }}">{{ library.title }}</a></h2></p>
9
+ <p>{{ item.description }}
10
+ <p><h2><a href="{{ library.url | prepend: site.github.url }}">{{ library.title }}</a></h2>
11
11
  {% endfor %}
12
12
 
13
13
  <h4>Key To Library Types</h4>
data/docs/live.md CHANGED
@@ -6,6 +6,6 @@ Spoiler alert, initially a least it is better just to accept the live works...
6
6
 
7
7
  {% for live_mode in site.live %}
8
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>
9
+ <p>{{ item.description }}
10
+ <p><h2><a href="{{ live_mode.url | prepend: site.github.url }}">{{ live_mode.title }}</a></h2>
11
11
  {% endfor %}
data/docs/magic.md CHANGED
@@ -6,6 +6,6 @@ Spoiler alert, initially a least it is better just to accept the magic works...
6
6
 
7
7
  {% for spell in site.magic %}
8
8
  <h2>{{ item.title }}</h2>
9
- <p>{{ item.description }}</p>
10
- <p><h2><a href="{{ spell.url | prepend: site.github.url }}">{{ spell.title }}</a></h2></p>
9
+ <p>{{ item.description }}
10
+ <p><h2><a href="{{ spell.url | prepend: site.github.url }}">{{ spell.title }}</a></h2>
11
11
  {% endfor %}
data/docs/methods.md CHANGED
@@ -5,6 +5,6 @@ title: Methods
5
5
 
6
6
  {% for method in site.methods %}
7
7
  <h2>{{ item.title }}</h2>
8
- <p>{{ item.description }}</p>
9
- <p><h2><a href="{{ method.url | prepend: site.github.url }}">{{ method.title }}</a></h2></p>
8
+ <p>{{ item.description }}
9
+ <p><h2><a href="{{ method.url | prepend: site.github.url }}">{{ method.title }}</a></h2>
10
10
  {% endfor %}
data/docs/modules.md CHANGED
@@ -5,8 +5,8 @@ title: Modules
5
5
 
6
6
  {% for module in site.modules %}
7
7
  <h2>{{ item.title }}</h2>
8
- <p>{{ item.description }}</p>
9
- <p><h2><a href="{{ module.url | prepend: site.github.url }}">{{ module.title }}</a></h2></p>
8
+ <p>{{ item.description }}
9
+ <p><h2><a href="{{ module.url | prepend: site.github.url }}">{{ module.title }}</a></h2>
10
10
  {% endfor %}
11
11
 
12
- <p>If you are new to ruby, you can read more about <a href="https://www.tutorialspoint.com/ruby/ruby_modules.htm">modules here</a></p>
12
+ <p>If you are new to ruby, you can read more about <a href="https://www.tutorialspoint.com/ruby/ruby_modules.htm">modules here</a>
data/docs/objects.md CHANGED
@@ -4,6 +4,6 @@ title: Variables and Objects
4
4
  ---
5
5
  {% for object in site.objects %}
6
6
  <h2>{{ item.title }}</h2>
7
- <p>{{ item.description }}</p>
8
- <p><h2><a href="{{ object.url | prepend: site.github.url }}">{{ object.title }}</a></h2></p>
7
+ <p>{{ item.description }}
8
+ <p><h2><a href="{{ object.url | prepend: site.github.url }}">{{ object.title }}</a></h2>
9
9
  {% endfor %}
data/lib/picrate.rb CHANGED
@@ -9,4 +9,5 @@ end
9
9
  Dir["#{PICRATE_ROOT}/lib/*.jar"].sort.each do |jar|
10
10
  require jar
11
11
  end
12
- require_relative 'picrate/app'
12
+ require "#{PICRATE_ROOT}/lib/picrate/app"
13
+ require "#{PICRATE_ROOT}/lib/picrate/helpers/numeric"
data/lib/picrate/app.rb CHANGED
@@ -5,7 +5,7 @@ require_relative 'helper_methods'
5
5
  require_relative 'library_loader'
6
6
  # A wrapper module for the processing App
7
7
  module Processing
8
- include_package 'processing.core' # imports the processing jar.
8
+ include_package 'processing.core' # imports the processing classes.
9
9
  # Load vecmath, fastmath and mathtool modules
10
10
  Java::Monkstone::PicrateLibrary.load(JRuby.runtime)
11
11
  SKETCH_ROOT = File.absolute_path('.')
@@ -55,6 +55,7 @@ module Processing
55
55
  include HelperMethods
56
56
  include MathTool
57
57
  include Math
58
+ include FastNoise
58
59
  # Alias some methods for familiarity for Shoes coders.
59
60
  alias oval ellipse
60
61
  alias stroke_width stroke_weight
@@ -144,7 +145,7 @@ module Processing
144
145
  def data_path(dat)
145
146
  dat_root = File.join(SKETCH_ROOT, 'data')
146
147
  Dir.mkdir(dat_root) unless File.exist?(dat_root)
147
- File.join(dat_root, dat)
148
+ File.join(dat_root, dat).to_java(:string)
148
149
  end
149
150
 
150
151
  private