[ Launch: coloradowildfires ] 5753941 by joannecheng
| # Text As Blueprint | |
| # http://www.openprocessing.org/sketch/60986 | |
| class TextAsBlueprint < Processing::App | |
| def setup | |
| size 600, 600 | |
| @text_typed = "hello world, how are you doing today" | |
| @centerX = width/2 | |
| @centerY = height/2 | |
| @shapeSpace = loadShape('data/space.svg') |
| require 'json' | |
| require 'httparty' | |
| require 'sqlite3-ruby' | |
| def get_trips(line) | |
| url = "http://developer.mbta.com/lib/rthr/#{line}.json" | |
| JSON.parse(HTTParty.get(url).body) | |
| end | |
| puts "start" |
adduser [username]
passwd [username]
[ Launch: Tributary inlet ] 5811382 by joannecheng[ Launch: Tributary inlet ] 5811335 by brjadams
[ Launch: Tributary inlet ] 5842685 by joannecheng
Hello there! So you want to install Ruby-Processing and get started creating some fun programs.
You can simply type gem install ruby-processing from any installation of Ruby. Ruby-Processing requires JRuby to run, but it comes bundled with its own version of JRuby (granted, a very old version: 1.6.4). To run a sketch using an installed version of JRuby, just run your sketch with the --jruby flag. That way you can use installed gems in your sketches.
The version that lives on rubygems.org is the version of Ruby-Processing I used in my presentation. However, this version of Ruby-Processing is technically outdated: it uses Processing version 1.5.4, whereas the current version of Ruby-Processing is using Processing version 2.0.
There are a few reasons why I used an older version for my talk, and why I recommend people use the older version of Ruby-Processing:
- It's easier to install: the current Ruby-Processing is too big for rubygems.org, so one needs to pull the repo down from github, install it on
| Bouncing Ball | |
| class BouncingBall < Processing::App | |
| def setup | |
| size 650, 800 | |
| smooth | |
| stroke_weight 5 | |
| @radius = 80 |
[ Launch: Tributary inlet ] 6349133 by joannecheng
[ Launch: Tributary inlet ] 6393970 by joannecheng