Created
October 8, 2010 04:44
-
-
Save jaymcgavren/616371 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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