Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
URL = ENV['DRB_URL'] || 'druby://0.0.0.0:9000'
class Sketch < Processing::App
def setup
render_mode P3D
require 'drb'
class <<self
attr_accessor :fade
%w{
clone
define_singleton_method
display
dup
extend
freeze
instance_eval
instance_exec
instance_variable_defined?
instance_variable_get
instance_variable_set
instance_variables
public_send
remove_instance_variable
send
tap
library_loaded?
load_java_library
load_libraries
load_library
load_ruby_library
}.each do |method|
if method_defined?(method.to_sym)
undef_method(method.to_sym)
end
end
end
background 100
self.fade = false
DRb.start_service(URL, self)
end
def draw
if fade
fill 0, 0, 0, 4
rect_mode CORNER
rect 0, 0, width, height
end
end
end
Sketch.new(:width => 1080, :height => 768, :title => 'http://gist.github.com/615896', :full_screen => false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.