Skip to content

Instantly share code, notes, and snippets.

@jaymcgavren
Created October 8, 2010 04:44
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jaymcgavren/616371 to your computer and use it in GitHub Desktop.
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