joonsrenderer 1.1-java → 1.3.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.mvn/extensions.xml +1 -1
- data/.mvn/wrapper/MavenWrapperDownloader.java +117 -0
- data/.mvn/wrapper/maven-wrapper.properties +2 -0
- data/CHANGELOG.md +12 -1
- data/README.md +1 -1
- data/Rakefile +6 -1
- data/docs/Gemfile +2 -0
- data/docs/_config.yml +3 -0
- data/docs/_includes/header.html +1 -1
- data/docs/_includes/top.html +11 -0
- data/docs/_layouts/default.html +6 -15
- data/docs/_posts/2017-01-06-media.md +101 -0
- data/docs/_posts/2017-01-08-animated_ray_tracing.md +2 -2
- data/docs/_posts/2017-01-08-resources.md +14 -0
- data/docs/about.md +2 -2
- data/docs/assets/media_captured.png +0 -0
- data/docs/assets/media_rendered.png +0 -0
- data/joonsrenderer.gemspec +2 -2
- data/lib/commons.compiler/module-info.class +0 -0
- data/lib/commons.compiler/module-info.java +7 -0
- data/lib/janino/module-info.class +0 -0
- data/lib/janino/module-info.java +5 -0
- data/lib/joonsrenderer/version.rb +1 -1
- data/mvnw +310 -0
- data/mvnw.cmd +182 -0
- data/pom.rb +22 -22
- data/pom.xml +32 -17
- data/src/{test/java/a_maintest.java → a_maintest.java} +1 -1
- data/src/main/java/SunflowGUI.java +295 -351
- data/src/main/java/joons/JRFiller.java +15 -23
- data/src/main/java/joons/JoonsRenderer.java +6 -5
- data/src/main/java/org/sunflow/AsciiFileSunflowAPI.java +1 -1
- data/src/main/java/org/sunflow/BinaryFileSunflowAPI.java +1 -1
- data/src/main/java/org/sunflow/SunflowAPI.java +5 -5
- data/src/main/java/org/sunflow/core/GIEngine.java +3 -1
- data/src/main/java/org/sunflow/core/Geometry.java +1 -1
- data/src/main/java/org/sunflow/core/ImageSampler.java +3 -0
- data/src/main/java/org/sunflow/core/InstanceList.java +1 -1
- data/src/main/java/org/sunflow/core/IntersectionState.java +7 -6
- data/src/main/java/org/sunflow/core/ParameterList.java +3 -2
- data/src/main/java/org/sunflow/core/PhotonStore.java +1 -0
- data/src/main/java/org/sunflow/core/Ray.java +4 -3
- data/src/main/java/org/sunflow/core/TextureCache.java +1 -1
- data/src/main/java/org/sunflow/core/accel/BoundingIntervalHierarchy.java +1 -1
- data/src/main/java/org/sunflow/core/accel/KDTree.java +1 -1
- data/src/main/java/org/sunflow/core/photonmap/CausticPhotonMap.java +2 -2
- data/src/main/java/org/sunflow/core/photonmap/GlobalPhotonMap.java +2 -2
- data/src/main/java/org/sunflow/core/renderer/BucketRenderer.java +3 -1
- data/src/main/java/org/sunflow/image/writers/EXRBitmapWriter.java +28 -19
- data/src/main/java/org/sunflow/image/writers/PNGBitmapWriter.java +5 -0
- data/src/main/java/org/sunflow/image/writers/TGABitmapWriter.java +20 -14
- data/src/main/java/org/sunflow/system/BenchmarkFramework.java +2 -2
- data/src/main/java/org/sunflow/system/RenderGlobalsPanel.java +5 -4
- metadata +20 -8
- data/docs/_includes/head.html +0 -15
@@ -15,19 +15,23 @@ public class TGABitmapWriter implements BitmapWriter {
|
|
15
15
|
private int width, height;
|
16
16
|
private byte[] data;
|
17
17
|
|
18
|
+
@Override
|
18
19
|
public void configure(String option, String value) {
|
19
20
|
}
|
20
21
|
|
22
|
+
@Override
|
21
23
|
public void openFile(String filename) throws IOException {
|
22
24
|
this.filename = filename;
|
23
25
|
}
|
24
26
|
|
27
|
+
@Override
|
25
28
|
public void writeHeader(int width, int height, int tileSize) throws IOException, UnsupportedOperationException {
|
26
29
|
this.width = width;
|
27
30
|
this.height = height;
|
28
31
|
data = new byte[width * height * 4]; // RGBA8
|
29
32
|
}
|
30
33
|
|
34
|
+
@Override
|
31
35
|
public void writeTile(int x, int y, int w, int h, Color[] color, float[] alpha) throws IOException {
|
32
36
|
color = ColorEncoder.unlinearize(color); // gamma correction
|
33
37
|
byte[] tileData = ColorEncoder.quantizeRGBA8(color, alpha);
|
@@ -43,21 +47,23 @@ public class TGABitmapWriter implements BitmapWriter {
|
|
43
47
|
}
|
44
48
|
}
|
45
49
|
|
50
|
+
@Override
|
46
51
|
public void closeFile() throws IOException {
|
47
|
-
// actually write the file from here
|
48
|
-
OutputStream f = new BufferedOutputStream(new FileOutputStream(filename));
|
49
52
|
// no id, no colormap, uncompressed 32bpp RGBA
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
53
|
+
try ( // actually write the file from here
|
54
|
+
OutputStream f = new BufferedOutputStream(new FileOutputStream(filename))) {
|
55
|
+
// no id, no colormap, uncompressed 32bpp RGBA
|
56
|
+
byte[] tgaHeader = {0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
57
|
+
f.write(tgaHeader);
|
58
|
+
// then the size info
|
59
|
+
f.write(width & 0xFF);
|
60
|
+
f.write((width >> 8) & 0xFF);
|
61
|
+
f.write(height & 0xFF);
|
62
|
+
f.write((height >> 8) & 0xFF);
|
63
|
+
// bitsperpixel and filler
|
64
|
+
f.write(32);
|
65
|
+
f.write(0);
|
66
|
+
f.write(data); // write image data bytes (already in BGRA order)
|
67
|
+
}
|
62
68
|
}
|
63
69
|
}
|
@@ -8,8 +8,8 @@ import org.sunflow.system.UI.Module;
|
|
8
8
|
*/
|
9
9
|
public class BenchmarkFramework {
|
10
10
|
|
11
|
-
private Timer[] timers;
|
12
|
-
private int timeLimit; // time limit in seconds
|
11
|
+
private final Timer[] timers;
|
12
|
+
private final int timeLimit; // time limit in seconds
|
13
13
|
|
14
14
|
public BenchmarkFramework(int iterations, int timeLimit) {
|
15
15
|
this.timeLimit = timeLimit;
|
@@ -64,6 +64,7 @@ public class RenderGlobalsPanel extends JTabbedPane {
|
|
64
64
|
|
65
65
|
/**
|
66
66
|
* Auto-generated main method to display this JPanel inside a new JFrame.
|
67
|
+
* @param args
|
67
68
|
*/
|
68
69
|
public static void main(String[] args) {
|
69
70
|
JFrame frame = new JFrame();
|
@@ -181,9 +182,9 @@ public class RenderGlobalsPanel extends JTabbedPane {
|
|
181
182
|
jLabel5.setText("Min:");
|
182
183
|
}
|
183
184
|
{
|
184
|
-
ComboBoxModel<String> minSamplingComboBoxModel = new DefaultComboBoxModel
|
185
|
+
ComboBoxModel<String> minSamplingComboBoxModel = new DefaultComboBoxModel<>(new String[]{
|
185
186
|
"Item One", "Item Two"});
|
186
|
-
minSamplingComboBox = new JComboBox
|
187
|
+
minSamplingComboBox = new JComboBox<>();
|
187
188
|
samplingPanel.add(minSamplingComboBox);
|
188
189
|
minSamplingComboBox.setModel(minSamplingComboBoxModel);
|
189
190
|
}
|
@@ -193,9 +194,9 @@ public class RenderGlobalsPanel extends JTabbedPane {
|
|
193
194
|
jLabel6.setText("Max:");
|
194
195
|
}
|
195
196
|
{
|
196
|
-
ComboBoxModel<String> maxSamplingComboxBoxModel = new DefaultComboBoxModel
|
197
|
+
ComboBoxModel<String> maxSamplingComboxBoxModel = new DefaultComboBoxModel<>(new String[]{
|
197
198
|
"Item One", "Item Two"});
|
198
|
-
maxSamplingComboxBox = new JComboBox
|
199
|
+
maxSamplingComboxBox = new JComboBox<>();
|
199
200
|
samplingPanel.add(maxSamplingComboxBox);
|
200
201
|
maxSamplingComboxBox.setModel(maxSamplingComboxBoxModel);
|
201
202
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: joonsrenderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.3.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- monkstone
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A realistic ray tracer for propane and JRubyArt
|
14
14
|
email:
|
@@ -19,24 +19,29 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
21
|
- ".mvn/extensions.xml"
|
22
|
+
- ".mvn/wrapper/MavenWrapperDownloader.java"
|
23
|
+
- ".mvn/wrapper/maven-wrapper.properties"
|
22
24
|
- CHANGELOG.md
|
23
25
|
- Gemfile
|
24
26
|
- LICENSE
|
25
27
|
- README.md
|
26
28
|
- Rakefile
|
27
29
|
- docs/.gitignore
|
30
|
+
- docs/Gemfile
|
28
31
|
- docs/_config.yml
|
29
32
|
- docs/_includes/footer.html
|
30
|
-
- docs/_includes/head.html
|
31
33
|
- docs/_includes/header.html
|
32
34
|
- docs/_includes/icon-github.html
|
33
35
|
- docs/_includes/icon-github.svg
|
34
36
|
- docs/_includes/icon-twitter.html
|
35
37
|
- docs/_includes/icon-twitter.svg
|
38
|
+
- docs/_includes/top.html
|
36
39
|
- docs/_layouts/default.html
|
37
40
|
- docs/_layouts/page.html
|
38
41
|
- docs/_layouts/post.html
|
42
|
+
- docs/_posts/2017-01-06-media.md
|
39
43
|
- docs/_posts/2017-01-08-animated_ray_tracing.md
|
44
|
+
- docs/_posts/2017-01-08-resources.md
|
40
45
|
- docs/_posts/2017-01-08-welcome.md
|
41
46
|
- docs/_sass/_base.scss
|
42
47
|
- docs/_sass/_layout.scss
|
@@ -46,18 +51,27 @@ files:
|
|
46
51
|
- docs/assets/Animation.png
|
47
52
|
- docs/assets/basic.png
|
48
53
|
- docs/assets/basic_traced.png
|
54
|
+
- docs/assets/media_captured.png
|
55
|
+
- docs/assets/media_rendered.png
|
49
56
|
- docs/css/main.scss
|
50
57
|
- docs/favicon.ico
|
51
58
|
- docs/feed.xml
|
52
59
|
- docs/index.html
|
53
60
|
- joonsrenderer.gemspec
|
54
|
-
- lib/commons-compiler-3.
|
55
|
-
- lib/
|
61
|
+
- lib/commons-compiler-3.1.3.jar
|
62
|
+
- lib/commons.compiler/module-info.class
|
63
|
+
- lib/commons.compiler/module-info.java
|
64
|
+
- lib/janino-3.1.3.jar
|
65
|
+
- lib/janino/module-info.class
|
66
|
+
- lib/janino/module-info.java
|
56
67
|
- lib/joonsrenderer.jar
|
57
68
|
- lib/joonsrenderer.rb
|
58
69
|
- lib/joonsrenderer/version.rb
|
70
|
+
- mvnw
|
71
|
+
- mvnw.cmd
|
59
72
|
- pom.rb
|
60
73
|
- pom.xml
|
74
|
+
- src/a_maintest.java
|
61
75
|
- src/main/java/SunflowGUI.java
|
62
76
|
- src/main/java/joons/JRFiller.java
|
63
77
|
- src/main/java/joons/JRImagePanel.java
|
@@ -272,7 +286,6 @@ files:
|
|
272
286
|
- src/main/java/org/sunflow/util/FastHashMap.java
|
273
287
|
- src/main/java/org/sunflow/util/FloatArray.java
|
274
288
|
- src/main/java/org/sunflow/util/IntArray.java
|
275
|
-
- src/test/java/a_maintest.java
|
276
289
|
homepage: https://ruby-processing.github.io/joonsrenderer/
|
277
290
|
licenses:
|
278
291
|
- GPL-3.0
|
@@ -292,8 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
305
|
- !ruby/object:Gem::Version
|
293
306
|
version: '0'
|
294
307
|
requirements: []
|
295
|
-
|
296
|
-
rubygems_version: 2.6.3
|
308
|
+
rubygems_version: 3.1.2
|
297
309
|
signing_key:
|
298
310
|
specification_version: 4
|
299
311
|
summary: From Sketch to Ray Traced Image
|
data/docs/_includes/head.html
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
<head>
|
2
|
-
<meta charset="utf-8">
|
3
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
5
|
-
{% if page.keywords %}
|
6
|
-
<meta name="keywords" content="{{ page.keywords }}" />
|
7
|
-
{% else %}
|
8
|
-
<meta name="keywords" content="art, JRubyArt, code, blog, ruby" />
|
9
|
-
{% endif %}<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
10
|
-
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
11
|
-
|
12
|
-
<link rel="stylesheet" href="https://ruby-processing.github.io/JRubyArt/css/main.css"/>
|
13
|
-
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.github.url | prepend: site.url }}">
|
14
|
-
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.github.url | prepend: site.url }}" />
|
15
|
-
</head>
|