|
|
Install
Install JRuby and set path.
http://jruby.codehaus.org/Home
Install Processing.
http://processing.org/download/index.html
Check out action-coding from svn.
$ svn checkout http://action-coding.googlecode.com/svn/trunk/ action-coding-read-only
To set path to Processing, Edit svn/trunk/config.yaml
p5home: /Applications/Processing 0135
How to use
run svn/trunk/run.command from Terminal. Then File dialog will appear and select this file. Java applet will be launched.
svn/trunk/examples/basics/arrays/array_objects.rb
Or you can launch this applet from terminal.
$ jruby aco.rb examples/basics/arrays/array_objects.rb
Open this file from text editor.
svn/trunk/examples/basics/array/array_objects.rb
On line 47, please edit below code and save this file.
p.stroke 4 * p.second, 0, 0
Do your applet stroke color trun into red ? When you save, a definition of Mod class will be changed. Next on line 4, please change code like this.
size 300, 300
If you know Processing, you anticipate window size will be changed. But setup() is called only once when applet launching. So, It is not necessarily the case that the result is not changed by code.
If you would like to run program from beginning, Set window focus to the applet and hit key,
⌘ + R (or Ctrl + R)
setup() function will be called and window size will become bigger.
If you meet error while coding, fix your code from stack trace information, set focus to the applet and type ⌘ + R. This applet will be relaunched.
Command line options
From Terminal, type this command. You can run applet from commnd line.
$ jruby aco.rb <option> filename
Options are below.
- i, --interval=VAL Set frequency of file observation by second. Default setting is 0.1.
- n, --no-file-observe Don't observe files. You will use this command to do presentation.
- r, --reload-always Relaunch applet when you save file every time.
- f, --fullscreen Run applet fullscreen.
- d, --display=VAL Set fullscreen display when your computer is connect to multi display. Default is 0.
- b, -bgcolor=VAL Set window background color. default is 0x000000.
If you would like to see source code with samples, you will find in,
svn/trunk/examples/3d_and_opengl/opengl/full_screen_app
Sign in to add a comment
