You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _projects/jruby_art.md
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,22 @@
1
1
---
2
2
layout: page
3
-
title: "JRubyArt"
4
-
keywords: propane, JRubyArt
3
+
title: JRubyArt
4
+
keywords: 'propane, JRubyArt'
5
5
---
6
6
7
-
##Understanding A JRubyArt Sketch ##
7
+
# Understanding A JRubyArt Sketch
8
8
9
9
Ruby-processing and now JRubyArt have both taken advantage of ruby language features to create a `DSL` like experience when coding processing in ruby, to the extent that
10
10
11
11
```ruby
12
12
background 0
13
13
```
14
+
14
15
is a valid sketch (ie you can write `static` sketches in ruby). Like vanilla processing we wrap this code before it is run but unlike vanilla processing we don't use a preprocessor.
15
16
16
17
What you can/should write (like a vanilla processing sketch) avoids much boilerplate.
17
18
18
-
###bare.rb ###
19
+
## bare.rb
19
20
20
21
```ruby
21
22
# load_library :my_library # jruby_art method
@@ -74,8 +75,9 @@ module Processing
74
75
end
75
76
```
76
77
77
-
### class_sketch.rb
78
-
An explicitly class wrapped sketch can actually be run directly with `jruby`, but you should prefer [propane][propane] for that.
78
+
## class_sketch.rb
79
+
80
+
An explicitly class wrapped sketch can actually be run directly with `jruby`, but you should prefer [propane][propane] for that. Another reason to favour [propane][propane] is the `glsl` sketch worked before processing-3.3.7 and hasn't worked since (reverted to earlier versions of PGraphicsOpenGL.java and PShapeOpenGL.java in propane).
0 commit comments