The JRubyArt LibraryLoader module is essentially the same as that developed for ruby-processing. But since processing-3.0 there is the distinct possibility that you will need to specify the vanilla processing sketchbook folder (in
.jruby_art/config.yml), for it to work properly. As a convenience you can call the module using either
load_libraries from your sketch. The preferred way call the library / libraries is as a symbol, comma separated list of symbols but Strings also work see below for core java libraries:-
load_library :sound load_libraries :sound, :pdf load_library 'sound' load_libraries 'sound', 'pdf'
To use classes from the sound package say with full-qualified class name use:-
generator = Java::ProcessingSound::WhiteNoise.new(self)
To avoid using the full-qualified class name use
include_package 'processing.sound' generator = WhiteNoise.new(self)
The contributed processing libraries are called in the same way, as well as ruby libraries such
control_panel the latter being a bit of a hybrid.
load_library :control_panel load_library :boids