Last active
December 25, 2016 06:40
-
-
Save monkstone/50f85d974e2c906ffd185f4058b5f9c3 to your computer and use it in GitHub Desktop.
Compare JRubyArt propane
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: false | |
require 'jruby_art' | |
module Processing | |
class Sketch < App # App is a subclass of processing.core.PApplet | |
# begin bare sketch ########################################### | |
# load_library :my_library # jruby_art method | |
# include_package 'org.package' # JRuby method | |
def settings | |
size 200, 200 # since processing-3.0 size 'mode' go here | |
end | |
def setup | |
sketch_title 'Bare Sketch' # jruby_art method | |
end | |
def draw | |
# draw loop | |
end | |
# end bare sketch ########################################### | |
end | |
Sketch.new | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: false | |
require 'jruby_art' | |
module Processing | |
# include_package 'org.package' # JRuby method | |
class TestModule < App # App is a subclass of processing.core.PApplet | |
# load_library :my_library # jruby_art method | |
def settings | |
size 200, 200 # since processing-3.0 size 'mode' go here | |
end | |
def setup | |
sketch_title 'Explicit JRubyArt Sketch' # jruby_art method | |
end | |
def draw | |
# draw loop | |
end | |
end | |
end | |
Processing::TestModule.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: false | |
require 'propane' | |
module Propane | |
# include_package 'org.package' # JRuby method | |
class TestModule < App # App is a subclass of processing.core.PApplet | |
# load_library :my_library # propane method | |
def settings | |
size 200, 200 # since processing-3.0 size 'mode' go here | |
end | |
def setup | |
sketch_title 'Explicit Propane Sketch' # propane method | |
end | |
def draw | |
# draw loop | |
end | |
end | |
end | |
Propane::TestModule.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment