Truly interactive coding takes a different direction when you issue the 'rp5 live' or 'rp5 live some_sketch.rb', appears to default to 'user name sketch'. Here is my default sketch. I think you need to include a draw loop in your sketch (to ensure there is a 'live thread?'). Note that this sketch of the newer type which is implicitly wrapped in an applet.
class Tux < Processing::App
size 200, 200
As you will see I have created an essentially blank sketch. When run live in a console you get an accompanying irb session to interact with your sketch. You can send messages to the running applet $app, as shown in picture below (NB: just click on the image to see if you can't read the text, otherwise you might need glasses, if you can identify the background image on my desktop you probably have extra-ordinary powers, clue he is an Assyrian god):
and magically the red rectangle is drawn, what fun (I cheated slightly on this image as I saved it directly from the irb environment using the following input:
$app.save_frame("tux.png") note the ruby like syntax, uses underscore rather than camel case.
- ► 2015 (51)
- ► 2014 (79)
- ► 2013 (94)
- ► 2010 (73)