Created
May 22, 2009 13:57
-
-
Save aberant/116142 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
class TuioAnimation | |
def initialize | |
@client = TuioClient.new | |
end | |
def nextFrame(view) | |
@client.tuio_cursors.each do |id, cursor| | |
view.do_something_with_cursor(cursor.x_pos) | |
end | |
end | |
end | |
# This adds an item to the Camera menu to activate our custom animation. | |
UI.menu("Camera").add_item("Start TUIO Control") { | |
Sketchup.active_model.active_view.animation = TuioAnimation.new | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment