Skip to content

Commit c9fa9f3

Browse files
committed
Refactor noise implementation out of PApplet
1 parent be64dd5 commit c9fa9f3

22 files changed

Lines changed: 19543 additions & 14389 deletions

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<extension>
44
<groupId>io.takari.polyglot</groupId>
55
<artifactId>polyglot-ruby</artifactId>
6-
<version>0.4.3</version>
6+
<version>0.4.6</version>
77
</extension>
88
</extensions>
99

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
**v2.5.0** Update to use jruby-complete-9.2.15.
1+
**v2.5.0** Refactor noise to delegate pattern and make OpenSimplex2 noise default noise, implement pdf and svg export libraries.
2+
Recommend JRuby-9.2.16.0 use
23

34
**v2.4.2** Update to use jruby-complete-9.2.14.0, regularise video/sound downloadswhen no processing ide.
45

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ A new version for jdk11 use, does not require an installed `vanilla processing`,
66

77
## Requirements
88

9-
A clean start for `jruby_art` with custom processing core included, built for [jruby-9.2.15.0](http://jruby.org/download) see [wiki](https://github.com/ruby-processing/JRubyArt/wiki/Building-latest-gem) for building gem from this repo.
9+
A clean start for `jruby_art` with custom processing core included, built for [jruby-9.2.16.0](http://jruby.org/download) see [wiki](https://github.com/ruby-processing/JRubyArt/wiki/Building-latest-gem) for building gem from this repo.
1010

1111
## Requirements
1212

13-
A suitable version of ruby (MRI `ruby 2.5+` or `jruby-9.2.15.0`) to download gem. NB: avoid ruby 2.7, it is guaranteed to give you problems (you've been warned)
13+
A suitable version of ruby (MRI `ruby 2.5+` or `jruby-9.2.16.0`) to download gem. NB: avoid ruby 2.7, it is guaranteed to give you problems (you've been warned)
1414
Tested and working AdoptOpenJDK 11-13, OpenJ9 14, if you have any issues with opengl sketches with distro installed JDK use a JDK from AdoptOpenJDK.
1515

1616

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ task :init do
1616
opengl.each do |gl|
1717
FileUtils.cp(File.join(jogl24, gl), File.join('.', 'lib'))
1818
end
19+
1920
end
2021

2122
desc 'Build gem'
@@ -27,6 +28,7 @@ desc 'Compile'
2728
task :compile do
2829
system "#{MVN} package"
2930
FileUtils.mv "target/jruby_art-#{JRubyArt::VERSION}.jar", 'lib'
31+
system "#{MVN} dependency:copy"
3032
end
3133

3234
desc 'Test'

jruby_art.gemspec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,20 @@ Gem::Specification.new do |spec|
1919
spec.homepage = 'https://ruby-processing.github.io/JRubyArt/'
2020
spec.post_install_message = "Use 'k9 --install' to install jruby-complete, and 'k9 --check' to check config."
2121
spec.licenses = %w[GPL-3.0 LGPL-2.0]
22-
2322
spec.files = FileList['bin/**/*', 'lib/**/*', 'library/**/*', 'samples/**/*', 'vendors/Rakefile'].exclude(/jar/).to_a
2423
spec.files << "lib/jruby_art-#{JRubyArt::VERSION}.jar"
2524
spec.files << 'lib/gluegen-rt.jar'
2625
spec.files << 'lib/jogl-all.jar'
2726
spec.files << 'lib/gluegen-rt-natives-linux-amd64.jar'
2827
spec.files << 'lib/gluegen-rt-natives-macosx-universal.jar'
29-
spec.files << 'lib/gluegen-rt-natives-ios-arm64.jar'
28+
# spec.files << 'lib/gluegen-rt-natives-ios-arm64.jar'
3029
spec.files << 'lib/gluegen-rt-natives-windows-amd64.jar'
3130
spec.files << 'lib/jogl-all-natives-linux-amd64.jar'
3231
spec.files << 'lib/jogl-all-natives-macosx-universal.jar'
33-
spec.files << 'lib/jogl-all-natives-ios-arm64.jar'
32+
# spec.files << 'lib/jogl-all-natives-ios-arm64.jar'
3433
spec.files << 'lib/jogl-all-natives-windows-amd64.jar'
34+
spec.files << 'library/pdf/itextpdf-5.5.13.2.jar'
35+
spec.files << 'library/svg/batik-all-1.14.jar'
3536
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
3637
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
3738
spec.require_paths = ['lib']

lib/jruby_art/native_folder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize
2525
end
2626

2727
def name
28-
return 'macosx' if /darwin|mac/.match?(os)
28+
return macos if /darwin|mac/.match?(os)
2929

3030
return format(LINUX_FORMAT, bit: bit) if /linux/.match?(os)
3131

library/pdf/pdf.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
# @TODO usage
4+
class Processing::App
5+
require_relative 'itextpdf-5.5.13.2.jar'
6+
java_import Java::ProcessingPdf::PGraphicsPDF
7+
end

library/svg/svg.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
# @TODO usage
4+
class Processing::App
5+
require_relative 'batik-all-1.14.jar'
6+
java_import Java::ProcessingSvg::PGraphicsSVG
7+
end

pom.rb

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,39 @@
2727
'source.directory' => 'src',
2828
'polyglot.dump.pom' => 'pom.xml',
2929
'project.build.sourceEncoding' => 'UTF-8',
30+
'jruby_art.basedir' => '${project.basedir}',
3031
'jogl.version' => '2.3.2',
32+
'batik.version' => '1.14',
33+
'itextpdf.version' => '5.5.13.2',
3134
'jruby.api' => 'http://jruby.org/apidocs/')
3235

33-
pom 'org.jruby:jruby:9.2.15.0'
36+
pom 'org.jruby:jruby:9.2.16.0'
3437
jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
3538
jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
3639
jar 'org.processing:video:3.0.2'
40+
jar 'org.apache.xmlgraphics:batik-all:${batik.version}'
41+
jar 'com.itextpdf:itextpdf:${itextpdf.version}'
3742

3843
overrides do
3944
plugin :resources, '3.1.0'
40-
plugin :dependency, '3.1.2'
45+
plugin :dependency, '3.1.2' do
46+
execute_goals( id: 'default-cli',
47+
artifactItems:[
48+
{ groupId: 'com.itextpdf',
49+
artifactId: 'itextpdf',
50+
version: '${itextpdf.version}',
51+
type: 'jar',
52+
outputDirectory: '${jruby_art.basedir}/library/pdf'
53+
},
54+
{ groupId: 'org.apache.xmlgraphics',
55+
artifactId: 'batik-all',
56+
version: '${batik.version}',
57+
type: 'jar',
58+
outputDirectory: '${jruby_art.basedir}/library/svg'
59+
}
60+
]
61+
)
62+
end
4163
plugin(:compiler, '3.8.1',
4264
'release' => '11')
4365
plugin(:javadoc, '2.10.4',

pom.xml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
44
5-
DO NOT MODIFIY - GENERATED CODE
5+
DO NOT MODIFY - GENERATED CODE
66
77
88
-->
@@ -55,8 +55,11 @@ DO NOT MODIFIY - GENERATED CODE
5555
<url>https://github.com/ruby-processing/JRubyArt/issues</url>
5656
</issueManagement>
5757
<properties>
58+
<batik.version>1.14</batik.version>
59+
<itextpdf.version>5.5.13.2</itextpdf.version>
5860
<jogl.version>2.3.2</jogl.version>
5961
<jruby.api>http://jruby.org/apidocs/</jruby.api>
62+
<jruby_art.basedir>${project.basedir}</jruby_art.basedir>
6063
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
6164
<processing.api>http://processing.github.io/processing-javadocs/core/</processing.api>
6265
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -66,7 +69,7 @@ DO NOT MODIFIY - GENERATED CODE
6669
<dependency>
6770
<groupId>org.jruby</groupId>
6871
<artifactId>jruby</artifactId>
69-
<version>9.2.15.0</version>
72+
<version>9.2.16.0</version>
7073
<type>pom</type>
7174
</dependency>
7275
<dependency>
@@ -84,6 +87,16 @@ DO NOT MODIFIY - GENERATED CODE
8487
<artifactId>video</artifactId>
8588
<version>3.0.2</version>
8689
</dependency>
90+
<dependency>
91+
<groupId>org.apache.xmlgraphics</groupId>
92+
<artifactId>batik-all</artifactId>
93+
<version>${batik.version}</version>
94+
</dependency>
95+
<dependency>
96+
<groupId>com.itextpdf</groupId>
97+
<artifactId>itextpdf</artifactId>
98+
<version>${itextpdf.version}</version>
99+
</dependency>
87100
</dependencies>
88101
<build>
89102
<resources>
@@ -114,6 +127,29 @@ DO NOT MODIFIY - GENERATED CODE
114127
<plugin>
115128
<artifactId>maven-dependency-plugin</artifactId>
116129
<version>3.1.2</version>
130+
<executions>
131+
<execution>
132+
<id>default-cli</id>
133+
<configuration>
134+
<artifactItems>
135+
<artifactItem>
136+
<groupId>com.itextpdf</groupId>
137+
<artifactId>itextpdf</artifactId>
138+
<version>${itextpdf.version}</version>
139+
<type>jar</type>
140+
<outputDirectory>${jruby_art.basedir}/library/pdf</outputDirectory>
141+
</artifactItem>
142+
<artifactItem>
143+
<groupId>org.apache.xmlgraphics</groupId>
144+
<artifactId>batik-all</artifactId>
145+
<version>${batik.version}</version>
146+
<type>jar</type>
147+
<outputDirectory>${jruby_art.basedir}/library/svg</outputDirectory>
148+
</artifactItem>
149+
</artifactItems>
150+
</configuration>
151+
</execution>
152+
</executions>
117153
</plugin>
118154
<plugin>
119155
<artifactId>maven-compiler-plugin</artifactId>

0 commit comments

Comments
 (0)