picrate 0.7.0-java → 0.8.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.mvn/wrapper/MavenWrapperDownloader.java +117 -0
- data/.mvn/wrapper/maven-wrapper.properties +2 -1
- data/.travis.yml +2 -5
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/Rakefile +15 -27
- data/docs/_config.yml +1 -1
- data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -1
- data/docs/_posts/2018-11-18-building-gem.md +1 -1
- data/lib/picrate/app.rb +1 -1
- data/lib/picrate/native_folder.rb +1 -1
- data/lib/picrate/version.rb +1 -1
- data/mvnw +127 -51
- data/mvnw.cmd +182 -0
- data/pom.rb +39 -30
- data/pom.xml +50 -37
- data/src/main/java/monkstone/ColorUtil.java +1 -1
- data/src/main/java/monkstone/core/LibraryProxy.java +0 -1
- data/src/main/java/monkstone/noise/SimplexNoise.java +1 -1
- data/src/main/java/monkstone/vecmath/GfxRender.java +87 -0
- data/src/main/java/monkstone/vecmath/ShapeRender.java +1 -1
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +48 -50
- data/src/main/java/processing/awt/PShapeJava2D.java +10 -0
- data/src/main/java/processing/awt/PSurfaceAWT.java +315 -371
- data/src/main/java/processing/core/PApplet.java +15424 -15495
- data/src/main/java/processing/core/PConstants.java +4 -4
- data/src/main/java/processing/core/PFont.java +394 -369
- data/src/main/java/processing/core/PGraphics.java +11 -10
- data/src/main/java/processing/core/PImage.java +1389 -1435
- data/src/main/java/processing/core/PMatrix2D.java +297 -294
- data/src/main/java/processing/core/PMatrix3D.java +641 -594
- data/src/main/java/processing/core/PShape.java +1755 -1784
- data/src/main/java/processing/core/PShapeOBJ.java +145 -133
- data/src/main/java/processing/core/PShapeSVG.java +808 -801
- data/src/main/java/processing/core/PStyle.java +141 -149
- data/src/main/java/processing/core/PSurface.java +111 -117
- data/src/main/java/processing/core/PSurfaceNone.java +178 -187
- data/src/main/java/processing/javafx/PGraphicsFX2D.java +349 -346
- data/src/main/java/processing/opengl/FontTexture.java +40 -59
- data/src/main/java/processing/opengl/FrameBuffer.java +28 -18
- data/src/main/java/processing/opengl/LinePath.java +7 -7
- data/src/main/java/processing/opengl/LineStroker.java +6 -10
- data/src/main/java/processing/opengl/PGL.java +56 -44
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +909 -2338
- data/src/main/java/processing/opengl/PJOGL.java +1722 -1763
- data/src/main/java/processing/opengl/PShader.java +1308 -1192
- data/src/main/java/processing/opengl/PShapeOpenGL.java +487 -1811
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +482 -497
- data/src/main/java/processing/opengl/Texture.java +99 -76
- data/src/main/java/processing/opengl/VertexBuffer.java +41 -43
- data/vendors/Rakefile +1 -1
- metadata +7 -4
data/mvnw.cmd
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
@REM ----------------------------------------------------------------------------
|
2
|
+
@REM Licensed to the Apache Software Foundation (ASF) under one
|
3
|
+
@REM or more contributor license agreements. See the NOTICE file
|
4
|
+
@REM distributed with this work for additional information
|
5
|
+
@REM regarding copyright ownership. The ASF licenses this file
|
6
|
+
@REM to you under the Apache License, Version 2.0 (the
|
7
|
+
@REM "License"); you may not use this file except in compliance
|
8
|
+
@REM with the License. You may obtain a copy of the License at
|
9
|
+
@REM
|
10
|
+
@REM http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
@REM
|
12
|
+
@REM Unless required by applicable law or agreed to in writing,
|
13
|
+
@REM software distributed under the License is distributed on an
|
14
|
+
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
15
|
+
@REM KIND, either express or implied. See the License for the
|
16
|
+
@REM specific language governing permissions and limitations
|
17
|
+
@REM under the License.
|
18
|
+
@REM ----------------------------------------------------------------------------
|
19
|
+
|
20
|
+
@REM ----------------------------------------------------------------------------
|
21
|
+
@REM Maven2 Start Up Batch script
|
22
|
+
@REM
|
23
|
+
@REM Required ENV vars:
|
24
|
+
@REM JAVA_HOME - location of a JDK home dir
|
25
|
+
@REM
|
26
|
+
@REM Optional ENV vars
|
27
|
+
@REM M2_HOME - location of maven2's installed home dir
|
28
|
+
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
29
|
+
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
30
|
+
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
31
|
+
@REM e.g. to debug Maven itself, use
|
32
|
+
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
33
|
+
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
34
|
+
@REM ----------------------------------------------------------------------------
|
35
|
+
|
36
|
+
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
37
|
+
@echo off
|
38
|
+
@REM set title of command window
|
39
|
+
title %0
|
40
|
+
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
41
|
+
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
42
|
+
|
43
|
+
@REM set %HOME% to equivalent of $HOME
|
44
|
+
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
45
|
+
|
46
|
+
@REM Execute a user defined script before this one
|
47
|
+
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
48
|
+
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
49
|
+
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
50
|
+
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
51
|
+
:skipRcPre
|
52
|
+
|
53
|
+
@setlocal
|
54
|
+
|
55
|
+
set ERROR_CODE=0
|
56
|
+
|
57
|
+
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
58
|
+
@setlocal
|
59
|
+
|
60
|
+
@REM ==== START VALIDATION ====
|
61
|
+
if not "%JAVA_HOME%" == "" goto OkJHome
|
62
|
+
|
63
|
+
echo.
|
64
|
+
echo Error: JAVA_HOME not found in your environment. >&2
|
65
|
+
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
66
|
+
echo location of your Java installation. >&2
|
67
|
+
echo.
|
68
|
+
goto error
|
69
|
+
|
70
|
+
:OkJHome
|
71
|
+
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
72
|
+
|
73
|
+
echo.
|
74
|
+
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
75
|
+
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
76
|
+
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
77
|
+
echo location of your Java installation. >&2
|
78
|
+
echo.
|
79
|
+
goto error
|
80
|
+
|
81
|
+
@REM ==== END VALIDATION ====
|
82
|
+
|
83
|
+
:init
|
84
|
+
|
85
|
+
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
86
|
+
@REM Fallback to current working directory if not found.
|
87
|
+
|
88
|
+
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
89
|
+
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
90
|
+
|
91
|
+
set EXEC_DIR=%CD%
|
92
|
+
set WDIR=%EXEC_DIR%
|
93
|
+
:findBaseDir
|
94
|
+
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
95
|
+
cd ..
|
96
|
+
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
97
|
+
set WDIR=%CD%
|
98
|
+
goto findBaseDir
|
99
|
+
|
100
|
+
:baseDirFound
|
101
|
+
set MAVEN_PROJECTBASEDIR=%WDIR%
|
102
|
+
cd "%EXEC_DIR%"
|
103
|
+
goto endDetectBaseDir
|
104
|
+
|
105
|
+
:baseDirNotFound
|
106
|
+
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
107
|
+
cd "%EXEC_DIR%"
|
108
|
+
|
109
|
+
:endDetectBaseDir
|
110
|
+
|
111
|
+
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
112
|
+
|
113
|
+
@setlocal EnableExtensions EnableDelayedExpansion
|
114
|
+
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
115
|
+
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
116
|
+
|
117
|
+
:endReadAdditionalConfig
|
118
|
+
|
119
|
+
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
120
|
+
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
121
|
+
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
122
|
+
|
123
|
+
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
|
124
|
+
|
125
|
+
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
126
|
+
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
127
|
+
)
|
128
|
+
|
129
|
+
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
130
|
+
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
131
|
+
if exist %WRAPPER_JAR% (
|
132
|
+
if "%MVNW_VERBOSE%" == "true" (
|
133
|
+
echo Found %WRAPPER_JAR%
|
134
|
+
)
|
135
|
+
) else (
|
136
|
+
if not "%MVNW_REPOURL%" == "" (
|
137
|
+
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
|
138
|
+
)
|
139
|
+
if "%MVNW_VERBOSE%" == "true" (
|
140
|
+
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
141
|
+
echo Downloading from: %DOWNLOAD_URL%
|
142
|
+
)
|
143
|
+
|
144
|
+
powershell -Command "&{"^
|
145
|
+
"$webclient = new-object System.Net.WebClient;"^
|
146
|
+
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
147
|
+
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
148
|
+
"}"^
|
149
|
+
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
150
|
+
"}"
|
151
|
+
if "%MVNW_VERBOSE%" == "true" (
|
152
|
+
echo Finished downloading %WRAPPER_JAR%
|
153
|
+
)
|
154
|
+
)
|
155
|
+
@REM End of extension
|
156
|
+
|
157
|
+
@REM Provide a "standardized" way to retrieve the CLI args that will
|
158
|
+
@REM work with both Windows and non-Windows executions.
|
159
|
+
set MAVEN_CMD_LINE_ARGS=%*
|
160
|
+
|
161
|
+
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
162
|
+
if ERRORLEVEL 1 goto error
|
163
|
+
goto end
|
164
|
+
|
165
|
+
:error
|
166
|
+
set ERROR_CODE=1
|
167
|
+
|
168
|
+
:end
|
169
|
+
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
170
|
+
|
171
|
+
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
172
|
+
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
173
|
+
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
174
|
+
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
175
|
+
:skipRcPost
|
176
|
+
|
177
|
+
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
178
|
+
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
179
|
+
|
180
|
+
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
181
|
+
|
182
|
+
exit /B %ERROR_CODE%
|
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.
|
4
|
+
id 'ruby-processing:picrate:0.8.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.'
|
@@ -24,36 +24,45 @@ project 'picrate', 'http://maven.apache.org' do
|
|
24
24
|
|
25
25
|
properties( 'jogl.version' => '2.3.2',
|
26
26
|
'jruby.api' => 'http://jruby.org/apidocs/',
|
27
|
-
'source.directory' => 'src
|
28
|
-
'maven.compiler.target' => '1.8',
|
27
|
+
'source.directory' => 'src',
|
29
28
|
'processing.api' => 'http://processing.github.io/processing-javadocs/core/',
|
30
29
|
'picrate.basedir' => '${project.basedir}',
|
31
30
|
'project.build.sourceEncoding' => 'utf-8',
|
32
|
-
'polyglot.dump.pom' => 'pom.xml'
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
31
|
+
'polyglot.dump.pom' => 'pom.xml'
|
32
|
+
)
|
33
|
+
|
34
|
+
pom 'org.jruby:jruby:9.2.7.0'
|
35
|
+
jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
|
36
|
+
jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
|
37
|
+
jar 'org.processing:video:3.0.2'
|
38
|
+
end
|
39
|
+
|
40
|
+
overrides do
|
41
|
+
plugin :resources, '2.7'
|
42
|
+
plugin :dependency, '2.8'
|
43
|
+
plugin( :compiler, '3.8.0', 'release' => '8' )
|
44
|
+
plugin(
|
45
|
+
:javadoc,
|
46
|
+
'2.10.4',
|
47
|
+
'detectOfflineLinks' => 'false',
|
48
|
+
'links' => [ '${processing.api}', '${jruby.api}' ]
|
49
|
+
)
|
50
|
+
plugin(
|
51
|
+
:jar, '3.1.0',
|
52
|
+
'archive' => {
|
53
|
+
'manifestEntries' => { 'Class-Path' => 'gluegen-rt.jar jog-all.jar' }
|
54
|
+
}
|
55
|
+
)
|
56
|
+
end
|
39
57
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
directory '${source.directory}/java'
|
52
|
-
includes ['**/**/*.glsl', '**/*.jnilib']
|
53
|
-
excludes '**/**/*.java'
|
54
|
-
end
|
55
|
-
resource do
|
56
|
-
directory '${source.directory}/resources'
|
57
|
-
includes ['**/*.png', '*.txt']
|
58
|
-
end
|
59
|
-
end
|
58
|
+
build do
|
59
|
+
resource do
|
60
|
+
directory '${source.directory}/main/java'
|
61
|
+
includes '**/**/*.glsl', '**/*.jnilib'
|
62
|
+
excludes '**/**/*.java'
|
63
|
+
end
|
64
|
+
resource do
|
65
|
+
directory '${source.directory}/main/resources'
|
66
|
+
includes '**/*.png', '*.txt'
|
67
|
+
end
|
68
|
+
end
|
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.
|
14
|
+
<version>0.8.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>
|
@@ -66,13 +66,11 @@ DO NOT MODIFIY - GENERATED CODE
|
|
66
66
|
<properties>
|
67
67
|
<jogl.version>2.3.2</jogl.version>
|
68
68
|
<jruby.api>http://jruby.org/apidocs/</jruby.api>
|
69
|
-
<maven.compiler.source>1.8</maven.compiler.source>
|
70
|
-
<maven.compiler.target>1.8</maven.compiler.target>
|
71
69
|
<picrate.basedir>${project.basedir}</picrate.basedir>
|
72
70
|
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
|
73
71
|
<processing.api>http://processing.github.io/processing-javadocs/core/</processing.api>
|
74
72
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
75
|
-
<source.directory>src
|
73
|
+
<source.directory>src</source.directory>
|
76
74
|
</properties>
|
77
75
|
<dependencies>
|
78
76
|
<dependency>
|
@@ -81,11 +79,6 @@ DO NOT MODIFIY - GENERATED CODE
|
|
81
79
|
<version>9.2.7.0</version>
|
82
80
|
<type>pom</type>
|
83
81
|
</dependency>
|
84
|
-
<dependency>
|
85
|
-
<groupId>org.processing</groupId>
|
86
|
-
<artifactId>video</artifactId>
|
87
|
-
<version>3.2.3</version>
|
88
|
-
</dependency>
|
89
82
|
<dependency>
|
90
83
|
<groupId>org.jogamp.jogl</groupId>
|
91
84
|
<artifactId>jogl-all</artifactId>
|
@@ -96,11 +89,16 @@ DO NOT MODIFIY - GENERATED CODE
|
|
96
89
|
<artifactId>gluegen-rt-main</artifactId>
|
97
90
|
<version>${jogl.version}</version>
|
98
91
|
</dependency>
|
92
|
+
<dependency>
|
93
|
+
<groupId>org.processing</groupId>
|
94
|
+
<artifactId>video</artifactId>
|
95
|
+
<version>3.0.2</version>
|
96
|
+
</dependency>
|
99
97
|
</dependencies>
|
100
98
|
<build>
|
101
99
|
<resources>
|
102
100
|
<resource>
|
103
|
-
<directory>${source.directory}/java</directory>
|
101
|
+
<directory>${source.directory}/main/java</directory>
|
104
102
|
<includes>
|
105
103
|
<include>**/**/*.glsl</include>
|
106
104
|
<include>**/*.jnilib</include>
|
@@ -110,38 +108,53 @@ DO NOT MODIFIY - GENERATED CODE
|
|
110
108
|
</excludes>
|
111
109
|
</resource>
|
112
110
|
<resource>
|
113
|
-
<directory>${source.directory}/resources</directory>
|
111
|
+
<directory>${source.directory}/main/resources</directory>
|
114
112
|
<includes>
|
115
113
|
<include>**/*.png</include>
|
116
114
|
<include>*.txt</include>
|
117
115
|
</includes>
|
118
116
|
</resource>
|
119
117
|
</resources>
|
120
|
-
<
|
121
|
-
<
|
122
|
-
<
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<
|
131
|
-
|
132
|
-
<
|
133
|
-
<
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
<
|
138
|
-
|
139
|
-
|
140
|
-
<
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
118
|
+
<pluginManagement>
|
119
|
+
<plugins>
|
120
|
+
<plugin>
|
121
|
+
<artifactId>maven-resources-plugin</artifactId>
|
122
|
+
<version>2.7</version>
|
123
|
+
</plugin>
|
124
|
+
<plugin>
|
125
|
+
<artifactId>maven-dependency-plugin</artifactId>
|
126
|
+
<version>2.8</version>
|
127
|
+
</plugin>
|
128
|
+
<plugin>
|
129
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
130
|
+
<version>3.8.0</version>
|
131
|
+
<configuration>
|
132
|
+
<release>8</release>
|
133
|
+
</configuration>
|
134
|
+
</plugin>
|
135
|
+
<plugin>
|
136
|
+
<artifactId>maven-javadoc-plugin</artifactId>
|
137
|
+
<version>2.10.4</version>
|
138
|
+
<configuration>
|
139
|
+
<detectOfflineLinks>false</detectOfflineLinks>
|
140
|
+
<links>
|
141
|
+
<link>${processing.api}</link>
|
142
|
+
<link>${jruby.api}</link>
|
143
|
+
</links>
|
144
|
+
</configuration>
|
145
|
+
</plugin>
|
146
|
+
<plugin>
|
147
|
+
<artifactId>maven-jar-plugin</artifactId>
|
148
|
+
<version>3.1.0</version>
|
149
|
+
<configuration>
|
150
|
+
<archive>
|
151
|
+
<manifestEntries>
|
152
|
+
<Class-Path>gluegen-rt.jar jog-all.jar</Class-Path>
|
153
|
+
</manifestEntries>
|
154
|
+
</archive>
|
155
|
+
</configuration>
|
156
|
+
</plugin>
|
157
|
+
</plugins>
|
158
|
+
</pluginManagement>
|
146
159
|
</build>
|
147
160
|
</project>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* This utility allows
|
2
|
+
* This utility allows PiCrate users to use the processing.org color method
|
3
3
|
* in their sketches. Includes a method to efficiently convert an cols of web
|
4
4
|
* strings to an cols of color int, and another to convert an cols of p5 color
|
5
5
|
* (int) to a string that can be used in ruby code (to generate web color cols).
|
@@ -50,7 +50,7 @@ public class SimplexNoise { // Simplex noise in 2D, 3D and 4D
|
|
50
50
|
49, 192, 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254,
|
51
51
|
138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180};
|
52
52
|
// To remove the need for index wrapping, double the permutation table length
|
53
|
-
static short[] PERM = new short[512];
|
53
|
+
static final short[] PERM = new short[512];
|
54
54
|
static short[] PERM_MOD_12 = new short[512];
|
55
55
|
|
56
56
|
static {
|
@@ -0,0 +1,87 @@
|
|
1
|
+
package monkstone.vecmath;
|
2
|
+
|
3
|
+
import processing.core.PGraphics;
|
4
|
+
|
5
|
+
/**
|
6
|
+
*
|
7
|
+
*
|
8
|
+
* @author Martin Prout
|
9
|
+
*/
|
10
|
+
public class GfxRender implements JRender {
|
11
|
+
|
12
|
+
final PGraphics g;
|
13
|
+
|
14
|
+
/**
|
15
|
+
*
|
16
|
+
* @param gfx PGraphics
|
17
|
+
*/
|
18
|
+
public GfxRender(final PGraphics gfx) {
|
19
|
+
this.g = gfx;
|
20
|
+
}
|
21
|
+
|
22
|
+
/**
|
23
|
+
*
|
24
|
+
* @param x double
|
25
|
+
* @param y double
|
26
|
+
*/
|
27
|
+
@Override
|
28
|
+
public void vertex(double x, double y) {
|
29
|
+
g.vertex((float) x, (float) y);
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
*
|
34
|
+
* @param x double
|
35
|
+
* @param y double
|
36
|
+
*/
|
37
|
+
@Override
|
38
|
+
public void curveVertex(double x, double y) {
|
39
|
+
g.curveVertex((float) x, (float) y);
|
40
|
+
}
|
41
|
+
|
42
|
+
/**
|
43
|
+
*
|
44
|
+
* @param x double
|
45
|
+
* @param y double
|
46
|
+
* @param z double
|
47
|
+
*/
|
48
|
+
@Override
|
49
|
+
public void vertex(double x, double y, double z) {
|
50
|
+
g.vertex((float) x, (float) y, (float) z);
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
*
|
55
|
+
* @param x double
|
56
|
+
* @param y double
|
57
|
+
* @param z double
|
58
|
+
*/
|
59
|
+
@Override
|
60
|
+
public void normal(double x, double y, double z) {
|
61
|
+
g.normal((float) x, (float) y, (float) z);
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
*
|
66
|
+
* @param x double
|
67
|
+
* @param y double
|
68
|
+
* @param z double
|
69
|
+
* @param u double
|
70
|
+
* @param v double
|
71
|
+
*/
|
72
|
+
@Override
|
73
|
+
public void vertex(double x, double y, double z, double u, double v) {
|
74
|
+
g.vertex((float) x, (float) y, (float) z, (float) u, (float) v);
|
75
|
+
}
|
76
|
+
|
77
|
+
/**
|
78
|
+
*
|
79
|
+
* @param x double
|
80
|
+
* @param y double
|
81
|
+
* @param z double
|
82
|
+
*/
|
83
|
+
@Override
|
84
|
+
public void curveVertex(double x, double y, double z) {
|
85
|
+
g.curveVertex((float) x, (float) y, (float) z);
|
86
|
+
}
|
87
|
+
}
|