teien 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -4
- data/bin/teien +5 -1
- data/lib/teien/animation/animation_manager.rb +2 -2
- data/lib/teien/animation/animation_manager_proxy.rb +2 -2
- data/lib/teien/application/local_application.rb +12 -0
- data/lib/teien/application/proxy_application.rb +28 -0
- data/lib/teien/application/server_application.rb +28 -0
- data/lib/teien/base_object/base_object_manager.rb +2 -4
- data/lib/teien/base_object/base_object_manager_base.rb +3 -3
- data/lib/teien/base_object/base_object_manager_proxy.rb +2 -4
- data/lib/teien/base_object/physics.rb +8 -9
- data/lib/teien/core/component_manager.rb +3 -1
- data/lib/teien/core/event_router.rb +33 -7
- data/lib/teien/core/network.rb +4 -0
- data/lib/teien/ui/user_interface.rb +3 -5
- data/lib/teien/ui/view.rb +7 -4
- data/lib/teien/version.rb +1 -1
- data/samples/actor/client +2 -0
- data/{mods/actor/configs → samples/actor/config}/plugins.cfg +0 -0
- data/{mods/actor/configs → samples/actor/config}/resources.cfg +0 -0
- data/samples/actor/lib/client.rb +38 -0
- data/{mods/actor/apps/common/browser_event.rb → samples/actor/lib/event.rb} +3 -2
- data/samples/actor/lib/local.rb +63 -0
- data/{mods/actor/apps/server/server_application.rb → samples/actor/lib/model.rb} +15 -16
- data/samples/actor/lib/server.rb +37 -0
- data/{mods/actor/addons/sinbad → samples/actor}/lib/sinbad/sinbad_info.rb +1 -0
- data/{mods/actor/addons/sinbad → samples/actor}/lib/sinbad/sinbad_state.rb +0 -0
- data/{mods/actor/addons/sinbad → samples/actor}/lib/sinbad.rb +1 -0
- data/{mods/actor/apps/browser/browser_application.rb → samples/actor/lib/ui.rb} +13 -27
- data/samples/actor/local +2 -0
- data/samples/actor/server +2 -0
- data/samples/hello_garden/client +2 -0
- data/{mods/hello_garden/configs → samples/hello_garden/config}/plugins.cfg +0 -0
- data/{mods/hello_garden/configs → samples/hello_garden/config}/resources.cfg +0 -0
- data/samples/hello_garden/lib/client.rb +41 -0
- data/{mods/hello_garden/apps/common/browser_event.rb → samples/hello_garden/lib/event.rb} +3 -2
- data/samples/hello_garden/lib/local.rb +56 -0
- data/{mods/hello_garden/apps/server/server_application.rb → samples/hello_garden/lib/model.rb} +22 -22
- data/samples/hello_garden/lib/server.rb +34 -0
- data/{mods/hello_garden/apps/browser/browser_application.rb → samples/hello_garden/lib/ui.rb} +14 -26
- data/samples/hello_garden/local +2 -0
- data/samples/hello_garden/server +2 -0
- metadata +42 -37
- data/lib/teien/addon/addon.rb +0 -25
- data/lib/teien/application/application.rb +0 -43
- data/lib/teien/commands/browser_command.rb +0 -46
- data/lib/teien/commands/local_command.rb +0 -21
- data/lib/teien/commands/server_command.rb +0 -39
- data/lib/teien/commands/std_command.rb +0 -71
- data/lib/teien/core/launcher.rb +0 -31
- data/mods/actor/commands/ai/actor_ai.rb +0 -117
- data/mods/actor/commands/ai_command.rb +0 -20
- data/mods/hello_garden/run +0 -6
@@ -1,21 +1,8 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "event"
|
2
|
+
require_relative "sinbad"
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
class BrowserApplication < Teien::Application
|
6
|
-
def initialize()
|
7
|
-
super
|
8
|
-
|
9
|
-
@ui = Teien::get_component("user_interface")
|
10
|
-
@ui.register_receiver(self)
|
11
|
-
@camera_mover = nil
|
12
|
-
end
|
13
|
-
|
14
|
-
##
|
15
|
-
# handlers of EventRouter.
|
16
|
-
#
|
17
|
-
|
18
|
-
def setup()
|
4
|
+
module Ui
|
5
|
+
def ui_setup()
|
19
6
|
puts "browser setup"
|
20
7
|
@controllable_actor_name = nil
|
21
8
|
|
@@ -30,12 +17,12 @@ class BrowserApplication < Teien::Application
|
|
30
17
|
@ui.hide_cursor()
|
31
18
|
end
|
32
19
|
|
33
|
-
def
|
34
|
-
event = Teien::Event::
|
20
|
+
def ui_connection_completed(from)
|
21
|
+
event = Teien::Event::ReadyToGo.new
|
35
22
|
@event_router.send_event(event, from)
|
36
23
|
end
|
37
24
|
|
38
|
-
def
|
25
|
+
def ui_update(delta)
|
39
26
|
@camera_mover.update(delta)
|
40
27
|
|
41
28
|
if @controllable_actor_name
|
@@ -45,9 +32,9 @@ class BrowserApplication < Teien::Application
|
|
45
32
|
end
|
46
33
|
end
|
47
34
|
|
48
|
-
def
|
35
|
+
def ui_receive_event(event, from)
|
49
36
|
case event
|
50
|
-
when Teien::Event::
|
37
|
+
when Teien::Event::ControllableActor
|
51
38
|
@controllable_actor_name = event.actor_name
|
52
39
|
|
53
40
|
actor = Teien::get_component("actor_manager").actors[@controllable_actor_name]
|
@@ -105,7 +92,7 @@ class BrowserApplication < Teien::Application
|
|
105
92
|
@event_router.quit = true
|
106
93
|
end
|
107
94
|
|
108
|
-
event = Event::
|
95
|
+
event = Event::KeyPressed.new(keyEvent.key)
|
109
96
|
@event_router.send_event(event)
|
110
97
|
|
111
98
|
return true
|
@@ -153,7 +140,7 @@ class BrowserApplication < Teien::Application
|
|
153
140
|
end
|
154
141
|
end
|
155
142
|
|
156
|
-
event = Event::
|
143
|
+
event = Event::KeyReleased.new(keyEvent.key)
|
157
144
|
@event_router.send_event(event)
|
158
145
|
|
159
146
|
return true
|
@@ -167,7 +154,7 @@ class BrowserApplication < Teien::Application
|
|
167
154
|
def mouse_pressed(mouseEvent, mouseButtonID)
|
168
155
|
@camera_mover.mouse_pressed(mouseEvent, mouseButtonID)
|
169
156
|
|
170
|
-
event = Event::
|
157
|
+
event = Event::MousePressed.new(mouseEvent, mouseButtonID, @ui.get_camera())
|
171
158
|
@event_router.send_event(event)
|
172
159
|
|
173
160
|
return true
|
@@ -176,10 +163,9 @@ class BrowserApplication < Teien::Application
|
|
176
163
|
def mouse_released(mouseEvent, mouseButtonID)
|
177
164
|
@camera_mover.mouse_released(mouseEvent, mouseButtonID)
|
178
165
|
|
179
|
-
event = Event::
|
166
|
+
event = Event::MouseReleased.new(mouseEvent, mouseButtonID, @ui.get_camera())
|
180
167
|
@event_router.send_event(event)
|
181
168
|
|
182
169
|
return true
|
183
170
|
end
|
184
171
|
end
|
185
|
-
|
data/samples/actor/local
ADDED
File without changes
|
File without changes
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require "teien"
|
2
|
+
require_relative "ui"
|
3
|
+
require "teien/application/proxy_application"
|
4
|
+
|
5
|
+
include Teien
|
6
|
+
|
7
|
+
class Client < ProxyApplication
|
8
|
+
include Ui
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super
|
12
|
+
|
13
|
+
require 'teien/ui/user_interface'
|
14
|
+
@ui = Teien::UserInterface.new()
|
15
|
+
Teien::register_component("user_interface", @ui )
|
16
|
+
|
17
|
+
@event_router.register_receiver(self)
|
18
|
+
@ui.register_receiver(self)
|
19
|
+
end
|
20
|
+
|
21
|
+
##
|
22
|
+
# EventRouter handlers
|
23
|
+
#
|
24
|
+
|
25
|
+
def setup
|
26
|
+
ui_setup()
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
def connection_completed(from)
|
31
|
+
ui_connection_completed(from)
|
32
|
+
end
|
33
|
+
|
34
|
+
def update(delta)
|
35
|
+
ui_update(delta)
|
36
|
+
@camera_mover.update(delta)
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
Client.new.connect_to_server("0.0.0.0", 11922)
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'teien'
|
2
|
+
require "teien/application/local_application"
|
3
|
+
require_relative 'model'
|
4
|
+
require_relative 'ui'
|
5
|
+
|
6
|
+
include Teien
|
7
|
+
|
8
|
+
class Local < LocalApplication
|
9
|
+
include Model
|
10
|
+
include Ui
|
11
|
+
|
12
|
+
def initialize(sync_period = 0)
|
13
|
+
super(sync_period)
|
14
|
+
|
15
|
+
require 'teien/ui/user_interface'
|
16
|
+
@ui = Teien::UserInterface.new()
|
17
|
+
Teien::register_component("user_interface", @ui )
|
18
|
+
|
19
|
+
@event_router.register_receiver(self)
|
20
|
+
@ui.register_receiver(self)
|
21
|
+
|
22
|
+
@first_update = true
|
23
|
+
end
|
24
|
+
|
25
|
+
def setup()
|
26
|
+
model_setup()
|
27
|
+
ui_setup()
|
28
|
+
end
|
29
|
+
|
30
|
+
def connection_binded(from)
|
31
|
+
model_connection_binded(from)
|
32
|
+
end
|
33
|
+
|
34
|
+
def connection_unbinded(from)
|
35
|
+
model_connection_unbinded(from)
|
36
|
+
end
|
37
|
+
|
38
|
+
def connection_completed(from)
|
39
|
+
ui_connection_completed(from)
|
40
|
+
end
|
41
|
+
|
42
|
+
##
|
43
|
+
# EventRouter handlers
|
44
|
+
#
|
45
|
+
|
46
|
+
def update(delta)
|
47
|
+
ui_update(delta)
|
48
|
+
end
|
49
|
+
|
50
|
+
def receive_event(event, from)
|
51
|
+
model_receive_event(event, from)
|
52
|
+
ui_receive_event(event, from)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
Local.new.start_application
|
data/{mods/hello_garden/apps/server/server_application.rb → samples/hello_garden/lib/model.rb}
RENAMED
@@ -1,10 +1,7 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative "event"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
class ServerApplication < Teien::Application
|
6
|
-
def setup()
|
7
|
-
puts "model setup"
|
3
|
+
module Model
|
4
|
+
def model_setup
|
8
5
|
@quit = false
|
9
6
|
@first_connection = true
|
10
7
|
@shot_num = 0
|
@@ -28,14 +25,28 @@ class ServerApplication < Teien::Application
|
|
28
25
|
floor.set_position(Vector3D.new(0, 0, 0))
|
29
26
|
end
|
30
27
|
|
31
|
-
def
|
32
|
-
|
28
|
+
def model_connection_binded(from)
|
29
|
+
end
|
30
|
+
|
31
|
+
def model_connection_unbinded(from)
|
33
32
|
end
|
34
33
|
|
35
|
-
def
|
36
|
-
|
34
|
+
def model_receive_event(event, from)
|
35
|
+
case event
|
36
|
+
when Teien::Event::ReadyToGo
|
37
|
+
if @first_connection
|
38
|
+
create_objects()
|
39
|
+
@first_connection = false
|
40
|
+
end
|
41
|
+
when Teien::Event::MousePressed
|
42
|
+
shot_box(event.camera_pos, event.camera_dir)
|
43
|
+
end
|
37
44
|
end
|
38
45
|
|
46
|
+
##
|
47
|
+
# Helper methods
|
48
|
+
#
|
49
|
+
|
39
50
|
def create_objects()
|
40
51
|
# create a box.
|
41
52
|
object_info = BoxObjectInfo.new(Vector3D.new(1, 1, 1))
|
@@ -84,18 +95,6 @@ class ServerApplication < Teien::Application
|
|
84
95
|
=end
|
85
96
|
end
|
86
97
|
|
87
|
-
def receive_event(event, from)
|
88
|
-
case event
|
89
|
-
when Teien::Event::Browser::ReadyToGo
|
90
|
-
if @first_connection
|
91
|
-
create_objects()
|
92
|
-
@first_connection = false
|
93
|
-
end
|
94
|
-
when Teien::Event::Browser::MousePressed
|
95
|
-
shot_box(event.camera_pos, event.camera_dir)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
98
|
def shot_box(pos, dir)
|
100
99
|
object_info = BoxObjectInfo.new(Vector3D.new(1, 1, 1))
|
101
100
|
object_info.material_name = "Examples/SphereMappedRustySteel"
|
@@ -106,5 +105,6 @@ class ServerApplication < Teien::Application
|
|
106
105
|
box.apply_impulse(force, Vector3D.new(0.0, 0.0, 0.0))
|
107
106
|
@event_router.send_event(Teien::Event::BaseObject::SyncObject.new(box))
|
108
107
|
end
|
108
|
+
|
109
109
|
end
|
110
110
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'teien'
|
2
|
+
require_relative "model"
|
3
|
+
require "teien/application/server_application"
|
4
|
+
|
5
|
+
include Teien
|
6
|
+
|
7
|
+
class Server < ServerApplication
|
8
|
+
include Model
|
9
|
+
|
10
|
+
def initialize(sync_period = 0.3)
|
11
|
+
super(sync_period)
|
12
|
+
|
13
|
+
@event_router.register_receiver(self)
|
14
|
+
end
|
15
|
+
|
16
|
+
def setup()
|
17
|
+
model_setup()
|
18
|
+
end
|
19
|
+
|
20
|
+
def connection_binded(from)
|
21
|
+
model_connection_binded(from)
|
22
|
+
end
|
23
|
+
|
24
|
+
def connection_unbinded(from)
|
25
|
+
model_connection_unbinded(from)
|
26
|
+
end
|
27
|
+
|
28
|
+
def receive_event(event, from)
|
29
|
+
model_receive_event(event, from)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
Server.new.start_server("0.0.0.0", 11922)
|
data/{mods/hello_garden/apps/browser/browser_application.rb → samples/hello_garden/lib/ui.rb}
RENAMED
@@ -1,21 +1,7 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative 'event'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
class BrowserApplication < Teien::Application
|
6
|
-
def initialize()
|
7
|
-
super
|
8
|
-
|
9
|
-
@ui = Teien::get_component("user_interface")
|
10
|
-
@ui.register_receiver(self)
|
11
|
-
@camera_mover = nil
|
12
|
-
end
|
13
|
-
|
14
|
-
##
|
15
|
-
# handlers of EventRouter.
|
16
|
-
#
|
17
|
-
|
18
|
-
def setup()
|
3
|
+
module Ui
|
4
|
+
def ui_setup()
|
19
5
|
puts "browser setup"
|
20
6
|
@controllable_actor_name = nil
|
21
7
|
|
@@ -30,17 +16,20 @@ class BrowserApplication < Teien::Application
|
|
30
16
|
@ui.hide_cursor()
|
31
17
|
end
|
32
18
|
|
33
|
-
def
|
34
|
-
event = Teien::Event::
|
19
|
+
def ui_connection_completed(from)
|
20
|
+
event = Teien::Event::ReadyToGo.new
|
35
21
|
@event_router.send_event(event, from)
|
36
22
|
end
|
37
23
|
|
38
|
-
def
|
24
|
+
def ui_update(delta)
|
39
25
|
@camera_mover.update(delta)
|
40
26
|
end
|
41
27
|
|
28
|
+
def ui_receive_event(event, from)
|
29
|
+
end
|
30
|
+
|
42
31
|
##
|
43
|
-
# handlers
|
32
|
+
# UserInterface handlers
|
44
33
|
#
|
45
34
|
|
46
35
|
def key_pressed(keyEvent)
|
@@ -62,7 +51,7 @@ class BrowserApplication < Teien::Application
|
|
62
51
|
@event_router.quit = true
|
63
52
|
end
|
64
53
|
|
65
|
-
event = Event::
|
54
|
+
event = Event::KeyPressed.new(keyEvent.key)
|
66
55
|
@event_router.send_event(event)
|
67
56
|
|
68
57
|
return true
|
@@ -81,7 +70,7 @@ class BrowserApplication < Teien::Application
|
|
81
70
|
@camera_mover.move_right(false)
|
82
71
|
end
|
83
72
|
|
84
|
-
event = Event::
|
73
|
+
event = Event::KeyReleased.new(keyEvent.key)
|
85
74
|
@event_router.send_event(event)
|
86
75
|
|
87
76
|
return true
|
@@ -95,7 +84,7 @@ class BrowserApplication < Teien::Application
|
|
95
84
|
def mouse_pressed(mouseEvent, mouseButtonID)
|
96
85
|
@camera_mover.mouse_pressed(mouseEvent, mouseButtonID)
|
97
86
|
|
98
|
-
event = Event::
|
87
|
+
event = Event::MousePressed.new(mouseEvent, mouseButtonID, @ui.get_camera())
|
99
88
|
@event_router.send_event(event)
|
100
89
|
|
101
90
|
return true
|
@@ -104,10 +93,9 @@ class BrowserApplication < Teien::Application
|
|
104
93
|
def mouse_released(mouseEvent, mouseButtonID)
|
105
94
|
@camera_mover.mouse_released(mouseEvent, mouseButtonID)
|
106
95
|
|
107
|
-
event = Event::
|
96
|
+
event = Event::MouseReleased.new(mouseEvent, mouseButtonID, @ui.get_camera())
|
108
97
|
@event_router.send_event(event)
|
109
98
|
|
110
99
|
return true
|
111
100
|
end
|
112
101
|
end
|
113
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teien
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
|
-
requirement: &
|
16
|
+
requirement: &74100690 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *74100690
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: ruby-ois
|
27
|
-
requirement: &
|
27
|
+
requirement: &74096570 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *74096570
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ruby-ogre-installer
|
38
|
-
requirement: &
|
38
|
+
requirement: &74096300 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *74096300
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: ruby-procedural
|
49
|
-
requirement: &
|
49
|
+
requirement: &74095850 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *74095850
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: ruby-bullet
|
60
|
-
requirement: &
|
60
|
+
requirement: &74095380 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *74095380
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: teienlib
|
71
|
-
requirement: &
|
71
|
+
requirement: &74095070 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *74095070
|
80
80
|
description: An easy 3D world maker.
|
81
81
|
email:
|
82
82
|
- abexsoft@gmail.com
|
@@ -99,13 +99,14 @@ files:
|
|
99
99
|
- lib/teien/actor/actor_info.rb
|
100
100
|
- lib/teien/actor/actor_manager.rb
|
101
101
|
- lib/teien/actor/actor_manager_proxy.rb
|
102
|
-
- lib/teien/addon/addon.rb
|
103
102
|
- lib/teien/animation/animation.rb
|
104
103
|
- lib/teien/animation/animation_event.rb
|
105
104
|
- lib/teien/animation/animation_manager.rb
|
106
105
|
- lib/teien/animation/animation_manager_proxy.rb
|
107
106
|
- lib/teien/animation/animation_operator.rb
|
108
|
-
- lib/teien/application/
|
107
|
+
- lib/teien/application/local_application.rb
|
108
|
+
- lib/teien/application/proxy_application.rb
|
109
|
+
- lib/teien/application/server_application.rb
|
109
110
|
- lib/teien/base_object/attachment_info.rb
|
110
111
|
- lib/teien/base_object/base_object.rb
|
111
112
|
- lib/teien/base_object/base_object_event.rb
|
@@ -127,16 +128,11 @@ files:
|
|
127
128
|
- lib/teien/base_object/std_objects/mesh_bb_object_info.rb
|
128
129
|
- lib/teien/base_object/std_objects/mesh_object_info.rb
|
129
130
|
- lib/teien/base_object/std_objects/sphere_object_info.rb
|
130
|
-
- lib/teien/commands/browser_command.rb
|
131
|
-
- lib/teien/commands/local_command.rb
|
132
|
-
- lib/teien/commands/server_command.rb
|
133
|
-
- lib/teien/commands/std_command.rb
|
134
131
|
- lib/teien/core/client_network.rb
|
135
132
|
- lib/teien/core/component_manager.rb
|
136
133
|
- lib/teien/core/core_event.rb
|
137
134
|
- lib/teien/core/dispatcher.rb
|
138
135
|
- lib/teien/core/event_router.rb
|
139
|
-
- lib/teien/core/launcher.rb
|
140
136
|
- lib/teien/core/network.rb
|
141
137
|
- lib/teien/core/remote_info.rb
|
142
138
|
- lib/teien/core/server_network.rb
|
@@ -158,22 +154,31 @@ files:
|
|
158
154
|
- lib/teien/ui/view_object.rb
|
159
155
|
- lib/teien/ui/view_object_factory.rb
|
160
156
|
- lib/teien/version.rb
|
161
|
-
-
|
162
|
-
-
|
163
|
-
-
|
164
|
-
-
|
165
|
-
-
|
166
|
-
-
|
167
|
-
-
|
168
|
-
-
|
169
|
-
-
|
170
|
-
-
|
171
|
-
-
|
172
|
-
-
|
173
|
-
-
|
174
|
-
-
|
175
|
-
-
|
176
|
-
-
|
157
|
+
- samples/actor/client
|
158
|
+
- samples/actor/config/plugins.cfg
|
159
|
+
- samples/actor/config/resources.cfg
|
160
|
+
- samples/actor/lib/client.rb
|
161
|
+
- samples/actor/lib/event.rb
|
162
|
+
- samples/actor/lib/local.rb
|
163
|
+
- samples/actor/lib/model.rb
|
164
|
+
- samples/actor/lib/server.rb
|
165
|
+
- samples/actor/lib/sinbad.rb
|
166
|
+
- samples/actor/lib/sinbad/sinbad_info.rb
|
167
|
+
- samples/actor/lib/sinbad/sinbad_state.rb
|
168
|
+
- samples/actor/lib/ui.rb
|
169
|
+
- samples/actor/local
|
170
|
+
- samples/actor/server
|
171
|
+
- samples/hello_garden/client
|
172
|
+
- samples/hello_garden/config/plugins.cfg
|
173
|
+
- samples/hello_garden/config/resources.cfg
|
174
|
+
- samples/hello_garden/lib/client.rb
|
175
|
+
- samples/hello_garden/lib/event.rb
|
176
|
+
- samples/hello_garden/lib/local.rb
|
177
|
+
- samples/hello_garden/lib/model.rb
|
178
|
+
- samples/hello_garden/lib/server.rb
|
179
|
+
- samples/hello_garden/lib/ui.rb
|
180
|
+
- samples/hello_garden/local
|
181
|
+
- samples/hello_garden/server
|
177
182
|
- teien.gemspec
|
178
183
|
homepage: https://github.com/abexsoft/teien
|
179
184
|
licenses: []
|
data/lib/teien/addon/addon.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'teien'
|
2
|
-
|
3
|
-
module Teien
|
4
|
-
|
5
|
-
class Addon
|
6
|
-
@@addons = Array.new
|
7
|
-
@@loaded_addons = Array.new
|
8
|
-
|
9
|
-
def self.inherited(klass)
|
10
|
-
@@addons.push(klass)
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.load()
|
14
|
-
require 'teien/addon/addon'
|
15
|
-
Dir.glob("#{Dir.getwd}/addons/**/lib/*.rb") {|file| require "#{file}" }
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.instantiate()
|
19
|
-
@@addons.each {|addon|
|
20
|
-
@@loaded_addons.push(addon.new())
|
21
|
-
}
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'teien'
|
2
|
-
|
3
|
-
module Teien
|
4
|
-
|
5
|
-
class Application
|
6
|
-
@@apps = Array.new
|
7
|
-
@@loaded_apps = Array.new
|
8
|
-
|
9
|
-
def initialize()
|
10
|
-
@event_router = Teien::get_component("event_router")
|
11
|
-
@event_router.register_receiver(self)
|
12
|
-
@base_object_manager = Teien::get_component("base_object_manager")
|
13
|
-
@base_object_manager.register_receiver(self)
|
14
|
-
|
15
|
-
=begin
|
16
|
-
# set config files.
|
17
|
-
fileDir = File.dirname(File.expand_path(__FILE__))
|
18
|
-
@base_object_manager.plugins_cfg = "#{fileDir}/plugins.cfg"
|
19
|
-
@base_object_manager.resources_cfg = "#{fileDir}/resources.cfg"
|
20
|
-
=end
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.inherited(klass)
|
24
|
-
@@apps.push(klass)
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.load(command)
|
28
|
-
require "teien/application/application"
|
29
|
-
Dir.glob("#{Dir.getwd}/apps/#{command}/*.rb") {|file| require "#{file}" }
|
30
|
-
end
|
31
|
-
|
32
|
-
def self.instantiate()
|
33
|
-
@@apps.each {|app|
|
34
|
-
@@loaded_apps.push(app.new())
|
35
|
-
}
|
36
|
-
end
|
37
|
-
|
38
|
-
def self.loaded_apps
|
39
|
-
return @@loaded_apps
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|