Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0

Sunday, 18 January 2015

Configuring ruby processing

There is this gui for configuring ruby-processing, it is a regular processing sketch you can run in the processing ide.
You should click the noruby button if you have not installed jruby (and do not intend to install jruby) on your system (but then you may find you can't run sketches using other gems).
You could use processing-3.0a5 instead of processing-2.2.1 (but then use the processing ide to install the sound/minim and video libraries, since these are no longer included in processing-3.0).
The suggested location of processing root will adapt for your OS (a typical linux location is shown, Archlinux uses /usr/share/processing, others may choose /opt/processing).
Vanilla processing sketch configRP5.pde

This is an example config file:-
  "JRUBY": "false",
  "PROCESSING_ROOT": "/home/tux/processing-3.0a5",
  "X_OFF": 192,
  "Y_OFF": 108

Or create your own .rp5rc 'yaml' file in $HOME, with an editor such as vim (configRP5 saves as 'json', psych can use either form) X_OFF and Y_OFF can be used to control the position of the sketch on screen:-
PROCESSING_ROOT: /home/tux/processing-2.2.1
JRUBY: "false"
X_OFF: 50
Y_OFF: 50

Windows users might benefit from setting the 'RP5_ROOT' environmental variable here (point it to where gem gets installed). You can also enter global 'java_args' here if you wish, however using java_args.txt in the sketches data folder is more flexible. Though apparently a .jrubyrc in a local folder, takes precedence, this may be very useful to run say shader sketches (a possible alternative to my custom Rakefile to configure autorun sketches?). Anyone using processing-3.0+ should be aware that sketchbook path setting might be changed for processing-3.0+ use JRubyArt instead of ruby-processing.

No comments:

Post a Comment


Blog Archive

About Me

My photo
I have developed JRubyArt and propane new versions of ruby-processing for JRuby- and processing-3.2.2