Skip to content

Instantly share code, notes, and snippets.

@aberant
Created May 22, 2009 13:57
Show Gist options
  • Save aberant/116142 to your computer and use it in GitHub Desktop.
Save aberant/116142 to your computer and use it in GitHub Desktop.
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