Skip to content
View classic.rb
# Java::OrgJrubyExceptions::RaiseException
# (ArgumentError) wrong number of arguments calling `initialize` (3 for 0)
# RUBY.mouse_moved(mesh_doodle.rb:62)
attr_reader :prev, :p, :q, :rotation, :faces, :pos, :weight, :renderer
Face =, :b, :c)
class Vec3D # re-open the Vec3D class to add rotation functionality
def rotate_y(theta)
View ruby.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View bounce.rb
# bounce.rb
class Bounce < Processing::App
BLUE = '#0000FF'
GREEN = '#00FF00'
RED = '#FF0000'
View extensions.xml
<?xml version="1.0" encoding="UTF-8"?>
View steinberg.glsl
// Original shader by RavenWorks
// Fake Floyd-Steinberg dithering
// Adapted for Ruby-Processing by Martin Prout <@monkstoneT>
#ifdef GL_ES
precision mediump float;
precision mediump int;
View custom_array.rb
require 'forwardable'
# A custom Array created using forwardable (that can also access the PApplet pre,
# post and draw loops by extending our new LibraryProxy class. Also has access
# to custom background(int), fill(int) and stroke(int) methods.
class CustomArray < LibraryProxy
extend Forwardable
def_delegators(:@objs, :each, :<<)
include Enumerable
View convert.rb
# convert.rb
def titleize(str)
str.gsub(/::/, '/')
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
.tr('-', '_')
.gsub(/_id$/, '')
.gsub(/_/, ' ').capitalize
View test.rb
require 'java'
java_import java.lang.System
jars = Dir[File.join('/home/tux/ruby-processing/lib', '**/*.jar')]
System.setProperty('java.class.path', jars.join(':'))
p System.getProperties['java.class.path']
libpath = System.getProperties['java.library.path']
System.setProperty('java.library.path', ['/home/tux/lib/linux64', libpath].join(':'))
View box_fluid_demo.rb
require 'toxiclibs'
# <p>BoxFLuid demo combining 3D physics particles with the IsoSurface class to
# create an animated mesh with a fluid behaviour. The mesh is optionally created
# within a boundary sphere, but other forms can be created using a custom
# ParticleConstraint class.</p>
# <p>Dependencies:</p>
# <ul>
View .nbattrs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE attributes PUBLIC "-//NetBeans//DTD DefaultAttributes 1.0//EN" "">
<attributes version="1.0">
<fileobject name="Sketch.rb">
<attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
<attr name="template" boolvalue="true"/>
<fileobject name="SketchGL.rb">
<attr name="displayName" stringvalue="SketchGL.rb"/>
<attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
Something went wrong with that request. Please try again.