aberant-tuio-ruby 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,32 @@
1
+ require File.join( File.dirname( __FILE__ ), '..', 'lib', 'tuio-ruby' )
2
+
3
+
4
+ @tc = TuioClient.new
5
+
6
+ @tc.on_object_creation do | to |
7
+ puts "New TUIO Object at x: #{to.x_pos}, y: #{to.y_pos}"
8
+ end
9
+
10
+ @tc.on_object_update do | to |
11
+ puts "Updated TUIO Object #{to.fiducial_id} at x: #{to.x_pos}, y: #{to.y_pos}"
12
+ end
13
+
14
+ @tc.on_object_removal do | to |
15
+ puts "Removed TUIO Object #{to.fiducial_id}"
16
+ end
17
+
18
+
19
+ @tc.on_cursor_creation do | to |
20
+ puts "New TUIO Cursor at x: #{to.x_pos}, y: #{to.y_pos}"
21
+ end
22
+
23
+ @tc.on_cursor_update do | to |
24
+ puts "Updated TUIO Cursor #{to.session_id} at x: #{to.x_pos}, y: #{to.y_pos}"
25
+ end
26
+
27
+ @tc.on_cursor_removal do | to |
28
+ puts "Removed TUIO Cursor #{to.session_id}"
29
+ end
30
+
31
+ @tc.start
32
+ sleep
@@ -0,0 +1,12 @@
1
+ $: << File.dirname( __FILE__ )
2
+
3
+ require 'tuio-ruby/tuio_cursor_parameter'
4
+ require 'tuio-ruby/tuio_object_parameter'
5
+
6
+ require 'tuio-ruby/tuio_container'
7
+ require 'tuio-ruby/tuio_cursor'
8
+ require 'tuio-ruby/tuio_object'
9
+
10
+ require 'tuio-ruby/tuio_client'
11
+
12
+
@@ -1,13 +1,9 @@
1
1
  require 'rubygems'
2
2
  require 'osc'
3
3
 
4
- require File.join( File.dirname( __FILE__ ), 'my_environment')
5
-
6
- require "tuio_object"
7
- require "tuio_cursor"
8
- require 'tuio_object_parameter'
9
- require 'tuio_cursor_parameter'
10
-
4
+ # core exts
5
+ require 'core_ext/object'
6
+ require 'core_ext/float'
11
7
 
12
8
  class TuioClient
13
9
  include OSC
@@ -1,4 +1,4 @@
1
- require 'tuio_point'
1
+ require File.join( File.dirname( __FILE__ ), 'tuio_point' )
2
2
 
3
3
  class TuioContainer < TuioPoint
4
4
  attr_accessor :session_id, :x_pos, :y_pos, :x_speed, :y_speed, :motion_accel
@@ -1,4 +1,4 @@
1
- require 'tuio_container'
1
+ require File.join( File.dirname( __FILE__ ), 'tuio_container' )
2
2
 
3
3
  class TuioCursor < TuioContainer
4
4
 
@@ -1,4 +1,4 @@
1
- require 'tuio_parameter'
1
+ require File.join( File.dirname( __FILE__ ), 'tuio_parameter' )
2
2
 
3
3
  # /tuio/2Dcur set s x y X Y m
4
4
 
@@ -1,4 +1,4 @@
1
- require 'tuio_container'
1
+ require File.join( File.dirname( __FILE__ ), 'tuio_container' )
2
2
 
3
3
  class TuioObject < TuioContainer
4
4
  attr_reader :angle, :fiducial_id, :rotation_vector, :rotation_accel
@@ -1,4 +1,5 @@
1
- require 'tuio_parameter'
1
+ require File.join( File.dirname( __FILE__ ), 'tuio_parameter' )
2
+
2
3
  # /tuio/2Dobj set s i x y a X Y A m r
3
4
 
4
5
 
@@ -3,7 +3,9 @@ require 'spec'
3
3
  require 'rr'
4
4
  require 'osc'
5
5
 
6
- require File.join( File.dirname( __FILE__ ), '..', 'lib', 'tuio_client' )
6
+ $: << File.join( File.dirname( __FILE__ ), '..', 'lib' )
7
+
8
+ require 'tuio-ruby'
7
9
 
8
10
  Spec::Runner.configure do |config|
9
11
  config.mock_with RR::Adapters::Rspec
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aberant-tuio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aberant
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-09 00:00:00 -07:00
12
+ date: 2009-08-30 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -23,24 +23,22 @@ extra_rdoc_files:
23
23
  - README.rdoc
24
24
  - LICENSE
25
25
  files:
26
- - README.rdoc
27
- - VERSION.yml
28
- - lib/core_ext
29
- - lib/core_ext/float.rb
30
- - lib/core_ext/object.rb
31
- - lib/my_environment.rb
32
- - lib/tuio_client.rb
33
- - lib/tuio_container.rb
34
- - lib/tuio_cursor.rb
35
- - lib/tuio_cursor_parameter.rb
36
- - lib/tuio_object.rb
37
- - lib/tuio_object_parameter.rb
38
- - lib/tuio_parameter.rb
39
- - lib/tuio_point.rb
40
- - spec/integration
26
+ - examples/tuio_dump.rb
27
+ - lib/tuio-ruby
28
+ - lib/tuio-ruby/core_ext
29
+ - lib/tuio-ruby/core_ext/float.rb
30
+ - lib/tuio-ruby/core_ext/object.rb
31
+ - lib/tuio-ruby/tuio_client.rb
32
+ - lib/tuio-ruby/tuio_container.rb
33
+ - lib/tuio-ruby/tuio_cursor.rb
34
+ - lib/tuio-ruby/tuio_cursor_parameter.rb
35
+ - lib/tuio-ruby/tuio_object.rb
36
+ - lib/tuio-ruby/tuio_object_parameter.rb
37
+ - lib/tuio-ruby/tuio_parameter.rb
38
+ - lib/tuio-ruby/tuio_point.rb
39
+ - lib/tuio-ruby.rb
41
40
  - spec/integration/tuio_event_spec.rb
42
41
  - spec/spec_helper.rb
43
- - spec/unit
44
42
  - spec/unit/tuio_container_spec.rb
45
43
  - spec/unit/tuio_cursor_parameter_spec.rb
46
44
  - spec/unit/tuio_cursor_spec.rb
@@ -48,9 +46,11 @@ files:
48
46
  - spec/unit/tuio_object_spec.rb
49
47
  - spec/unit/tuio_parameter_spec.rb
50
48
  - spec/unit/tuio_point_spec.rb
49
+ - README.rdoc
51
50
  - LICENSE
52
51
  has_rdoc: true
53
52
  homepage: http://github.com/aberant/tuio-ruby
53
+ licenses:
54
54
  post_install_message:
55
55
  rdoc_options:
56
56
  - --inline-source
@@ -72,9 +72,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements: []
73
73
 
74
74
  rubyforge_project:
75
- rubygems_version: 1.2.0
75
+ rubygems_version: 1.3.5
76
76
  signing_key:
77
77
  specification_version: 2
78
- summary: inital gem
79
- test_files: []
80
-
78
+ summary: library to interface with TUIO protocol
79
+ test_files:
80
+ - spec/integration/tuio_event_spec.rb
81
+ - spec/spec_helper.rb
82
+ - spec/unit/tuio_container_spec.rb
83
+ - spec/unit/tuio_cursor_parameter_spec.rb
84
+ - spec/unit/tuio_cursor_spec.rb
85
+ - spec/unit/tuio_object_parameter_spec.rb
86
+ - spec/unit/tuio_object_spec.rb
87
+ - spec/unit/tuio_parameter_spec.rb
88
+ - spec/unit/tuio_point_spec.rb
@@ -1,4 +0,0 @@
1
- ---
2
- :minor: 2
3
- :patch: 0
4
- :major: 0
@@ -1,6 +0,0 @@
1
- $: << File.dirname( __FILE__ )
2
- $: << File.join( File.dirname(__FILE__), 'core_ext' )
3
-
4
- require 'float'
5
- require 'object'
6
-