rp5 create my_sketch 200 200 rp5 watch my_sketch.rb
In a new terminal start up vim
vim my_sketch.rb
def setup size 200, 200 end def draw end
Edit the sketch to change its background
def setup size 200, 200 end def draw background 0 end
On saving the sketch refreshes for you
Now add a colored ellipse
def setup size 200, 200 end def draw background 0 fill 200, 0, 0 ellipse 100, 100, 120, 100 end
Save the sketch again and is update once more, how cool is that!!!
Now this all easiest done using vim (I mean you only need two consoles and you are cooking, but you could do the same with emacs, jEdit, eric, textmate to name but a few decent editors). With processing-2.2.1 can also be use with PDF, P2D and P3D modes "rp5 create my_sketch 200 200 p3d" works to create P3D sketches. Now as far as I know there is no book on ruby processing but there is Dan Shiffmans nature of code, and the examples have been translated to ruby-processing here or for the beginner there is his Learning Processing examples translated here. Then there is the 300+ examples included with ruby-processing.........
The Nature of code book is now available in Japanese.
No comments:
Post a Comment