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

Tuesday 19 November 2013

Testing the GLW renderer with ruby-processing

Andreas Colubri is working on an alternative renderer for processing (which seems to be stabilising as the GLW renderer). Here is an example sketch translated to ruby-processing requires processing-2.1.1 to run (OK development version as that is not currently available).
load_library :glw

include_package 'processing.glw'

def setup
  size(2560, 1440, GLW::P2D)
  frame_rate(180) # NB: here we are using the "processing" set frame rate method
end

def draw
  background(255, 0, 0)
  fill(255)
  # NB: here we access "processing" frame rate variable 
  text("FPS: #{frame_rate}", mouse_x, mouse_y)
end

No comments:

Post a Comment

Followers

Blog Archive

About Me

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