Sha256: ebb390eab9164523260f79a6a442958c27cdf5d4c2106cf7d088c93973e19947

Contents?: true

Size: 706 Bytes

Versions: 4

Compression:

Stored size: 706 Bytes

Contents

require File.join( File.dirname( __FILE__ ), '..', 'lib', 'tuio-ruby' )


@tc = TuioClient.new

@tc.on_object_creation do | to |
  puts "New TUIO Object at x: #{to.x_pos}, y: #{to.y_pos}"
end

@tc.on_object_update do | to |
  puts "Updated TUIO Object #{to.fiducial_id} at x: #{to.x_pos}, y: #{to.y_pos}"
end

@tc.on_object_removal do | to |
  puts "Removed TUIO Object #{to.fiducial_id}"
end


@tc.on_cursor_creation do | to |
  puts "New TUIO Cursor at x: #{to.x_pos}, y: #{to.y_pos}"
end

@tc.on_cursor_update do | to |
  puts "Updated TUIO Cursor #{to.session_id} at x: #{to.x_pos}, y: #{to.y_pos}"
end

@tc.on_cursor_removal do | to |
  puts "Removed TUIO Cursor #{to.session_id}"
end

@tc.start
sleep

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
aberant-tuio-ruby-0.2.1 examples/tuio_dump.rb
tuio-ruby-0.2.4 examples/tuio_dump.rb
tuio-ruby-0.2.3 examples/tuio_dump.rb
tuio-ruby-0.2.2 examples/tuio_dump.rb