Skip to content

Commit cbe2904

Browse files
authored
Merge pull request #13 from ruby-processing/open_simplex
Open simplex
2 parents b0121fd + f53935c commit cbe2904

15 files changed

Lines changed: 4825 additions & 1389 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
v2.3.0 Abandon Processing Value Noise in favour of OpenSimplex2, whith choosable options
2+
13
v2.2.0 Bump to latest JOGL-rc January 2021
24

35
v2.1.2 Bump to JRuby-9.2.14.0

lib/picrate/app.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ module Render
1616
java_import 'monkstone.vecmath.ShapeRender'
1717
end
1818

19-
VALUE = Java::MonkstoneNoise::NoiseMode::PERLIN
20-
SIMPLEX = Java::MonkstoneNoise::NoiseMode::SIMPLEX
19+
module NoiseModule
20+
java_import 'monkstone.noise.NoiseMode'
21+
end
2122

2223
# This class is the base class the user should inherit from when making
2324
# their own sketch.
@@ -58,6 +59,7 @@ class App < PApplet
5859
include HelperMethods
5960
include MathTool
6061
include Math
62+
include NoiseModule
6163
# Alias some methods for familiarity for Shoes coders.
6264
alias oval ellipse
6365
alias stroke_width stroke_weight
@@ -147,7 +149,7 @@ def post_initialize(_args); end
147149
def data_path(dat)
148150
dat_root = File.join(SKETCH_ROOT, 'data')
149151
Dir.mkdir(dat_root) unless File.exist?(dat_root)
150-
File.join(dat_root, dat)
152+
File.join(dat_root, dat).to_java(:string)
151153
end
152154

153155
private

0 commit comments

Comments
 (0)