entityjs 0.4.1 → 0.4.2
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/.gitignore +1 -0
- data/bin/entityjs +1 -1
- data/entityjs.gemspec +3 -2
- data/lib/entityjs.rb +13 -1
- data/lib/entityjs/command.rb +22 -16
- data/lib/entityjs/commands/build.rb +96 -48
- data/lib/entityjs/commands/eunit.rb +1 -1
- data/lib/entityjs/commands/html.rb +31 -0
- data/lib/entityjs/commands/min.rb +37 -0
- data/lib/entityjs/commands/new.rb +3 -0
- data/lib/entityjs/commands/server.rb +9 -3
- data/lib/entityjs/config.rb +163 -59
- data/lib/entityjs/dirc.rb +28 -0
- data/lib/entityjs/page.rb +73 -34
- data/lib/entityjs/version.rb +1 -1
- data/public/favicon.ico +0 -0
- data/public/play.html +33 -28
- data/public/qunit/qunit.entity.js +56 -6
- data/public/qunit/qunit.input.js +5 -5
- data/public/test.html +49 -0
- data/spec/javascripts/src/core/comp_spec.js +17 -6
- data/spec/javascripts/src/core/entity_spec.js +4 -5
- data/spec/javascripts/src/core/query_spec.js +25 -0
- data/spec/javascripts/src/core/re_spec.js +3 -3
- data/spec/javascripts/src/cycle/update_spec.js +8 -8
- data/spec/javascripts/src/display/align_spec.js +2 -2
- data/spec/javascripts/src/display/el_spec.js +17 -0
- data/spec/javascripts/src/input/keyboard_spec.js +4 -4
- data/spec/javascripts/src/input/mouse_spec.js +8 -7
- data/spec/javascripts/src/math/random_spec.js +8 -0
- data/spec/javascripts/src/util/clone_spec.js +20 -0
- data/spec/lib/entityjs/commands/build_spec.rb +3 -8
- data/spec/lib/entityjs/commands/html_spec.rb +27 -0
- data/spec/lib/entityjs/commands/min_spec.rb +30 -0
- data/spec/lib/entityjs/config_spec.rb +6 -0
- data/spec/lib/entityjs/page_spec.rb +4 -4
- data/src/core/comp.js +87 -31
- data/src/core/entity.js +38 -43
- data/src/core/load.js +2 -8
- data/src/core/query.js +17 -5
- data/src/core/re.js +1 -1
- data/src/core/system.js +8 -11
- data/src/cycle/drawlist.js +11 -11
- data/src/cycle/update.js +5 -5
- data/src/display/align.js +10 -3
- data/src/display/animate.js +26 -12
- data/src/display/el.js +99 -0
- data/src/input/keyboard.js +5 -5
- data/src/input/mouse.js +16 -11
- data/src/math/bisect.js +1 -1
- data/src/math/force.js +4 -4
- data/src/math/hitmap.js +2 -1
- data/src/math/iso.js +1 -1
- data/src/math/random.js +17 -2
- data/src/math/tile.js +1 -1
- data/src/media/sound.js +1 -1
- data/src/pattern/pathfind.js +2 -4
- data/src/save/storage.js +1 -1
- data/src/util/clone.js +12 -0
- data/src/util/scene.js +21 -16
- data/templates/circle/game.json +16 -0
- data/templates/circle/scripts/displays/circle.js +40 -0
- data/templates/circle/scripts/scenes/home.js +8 -17
- data/templates/circle/tests/scenes/home_test.js +3 -11
- data/templates/dom/game.json +6 -0
- data/templates/dom/scripts/els/btn.js +5 -0
- data/templates/dom/scripts/els/contain.js +5 -0
- data/templates/dom/scripts/els/header.js +5 -0
- data/templates/{animation → dom}/scripts/init.js +0 -0
- data/templates/dom/scripts/scenes/home.js +22 -0
- data/templates/{animation → dom}/scripts/scenes/load.js +0 -0
- data/templates/dom/tests/scenes/home_test.js +9 -0
- data/templates/{animation → dom}/tests/scenes/load_test.js +0 -0
- data/templates/isometric/game.json +16 -0
- data/templates/platform/game.json +18 -0
- data/templates/platform/scripts/displays/hero.js +1 -1
- data/templates/platform/scripts/items/coin.js +1 -1
- data/templates/platform/scripts/items/spring.js +1 -1
- data/templates/platform/tests/displays/hero_test.js +4 -4
- data/templates/platform/tests/factories.js +1 -1
- data/templates/platform/tests/items/coin_test.js +1 -1
- data/templates/pong/game.json +16 -0
- data/templates/tiltmaze/game.json +16 -0
- data/templates/tiltmaze/scripts/structs/level.js +1 -1
- data/templates/tiltmaze/scripts/tiles/walltile.js +1 -1
- metadata +45 -32
- data/.rspec +0 -2
- data/public/tests.html +0 -31
- data/src/cycle/worker.js +0 -9
- data/templates/animation/assets/images/hero.png +0 -0
- data/templates/animation/scripts/scenes/home.js +0 -41
- data/templates/animation/tests/init_test.js +0 -4
- data/templates/animation/tests/scenes/home_test.js +0 -15
- data/templates/arrow_keys/assets/images/arrow.png +0 -0
- data/templates/arrow_keys/config.yml +0 -22
- data/templates/arrow_keys/readme.txt +0 -9
- data/templates/arrow_keys/scripts/displays/arrow.js +0 -69
- data/templates/arrow_keys/scripts/init.js +0 -10
- data/templates/arrow_keys/scripts/inputs/controls.js +0 -35
- data/templates/arrow_keys/scripts/scenes/home.js +0 -20
- data/templates/arrow_keys/scripts/scenes/load.js +0 -57
- data/templates/arrow_keys/tests/displays/arrow_test.js +0 -29
- data/templates/arrow_keys/tests/init_test.js +0 -4
- data/templates/arrow_keys/tests/inputs/controls_test.js +0 -32
- data/templates/arrow_keys/tests/scenes/home_test.js +0 -0
- data/templates/arrow_keys/tests/scenes/load_test.js +0 -18
- data/templates/circle/config.yml +0 -22
- data/templates/isometric/config.yml +0 -22
- data/templates/platform/config.yml +0 -23
- data/templates/pong/config.yml +0 -22
- data/templates/tiltmaze/config.yml +0 -25
data/.gitignore
CHANGED
data/bin/entityjs
CHANGED
data/entityjs.gemspec
CHANGED
|
@@ -20,13 +20,14 @@ Gem::Specification.new do |s|
|
|
|
20
20
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
21
21
|
s.require_paths = ["lib"]
|
|
22
22
|
|
|
23
|
-
# specify any dependencies here; for example:
|
|
24
23
|
s.add_development_dependency "rspec"
|
|
25
24
|
s.add_development_dependency "jasmine"
|
|
26
25
|
|
|
27
|
-
s.add_dependency "sinatra", ">= 1.
|
|
26
|
+
s.add_dependency "sinatra", ">= 1.0"
|
|
28
27
|
s.add_dependency "coffee-script"
|
|
29
28
|
s.add_dependency 'uglifier'
|
|
30
29
|
s.add_dependency 'json'
|
|
31
30
|
s.add_dependency 'cobravsmongoose'
|
|
31
|
+
s.add_dependency 'cssmin'
|
|
32
|
+
|
|
32
33
|
end
|
data/lib/entityjs.rb
CHANGED
|
@@ -38,6 +38,14 @@ rescue LoadError
|
|
|
38
38
|
exit
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
begin
|
|
42
|
+
require "cssmin"
|
|
43
|
+
rescue LoadError
|
|
44
|
+
puts "Could not load 'cssmin'"
|
|
45
|
+
puts "run 'gem install cssmin'"
|
|
46
|
+
exit
|
|
47
|
+
end
|
|
48
|
+
|
|
41
49
|
module Entityjs
|
|
42
50
|
|
|
43
51
|
def self.root
|
|
@@ -67,7 +75,11 @@ module Entityjs
|
|
|
67
75
|
return nil
|
|
68
76
|
end
|
|
69
77
|
end
|
|
70
|
-
|
|
78
|
+
|
|
79
|
+
def self.public_path
|
|
80
|
+
return "#{Entityjs::root}/public"
|
|
81
|
+
end
|
|
82
|
+
|
|
71
83
|
end
|
|
72
84
|
|
|
73
85
|
require 'entityjs/command'
|
data/lib/entityjs/command.rb
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
Dir.glob("#{Entityjs::root}/lib/entityjs
|
|
2
|
-
Dir.glob("#{Entityjs::root}/lib/entityjs/*/*.rb").each {|f| require f }
|
|
1
|
+
Dir.glob("#{Entityjs::root}/lib/entityjs//**/*.rb").each {|f| require f }
|
|
3
2
|
|
|
4
3
|
# 0 - ok
|
|
5
4
|
# 1 - command not found
|
|
@@ -23,11 +22,15 @@ module Entityjs
|
|
|
23
22
|
when /^(test|t)$/
|
|
24
23
|
return Entityjs::Test.generate(args)
|
|
25
24
|
|
|
26
|
-
when 'release'
|
|
25
|
+
when '/^(release|r)$/'
|
|
27
26
|
return Entityjs::Release.generate(args)
|
|
27
|
+
|
|
28
28
|
when 'eunit'
|
|
29
29
|
return Entityjs::Eunit.generate(args)
|
|
30
30
|
|
|
31
|
+
when 'min'
|
|
32
|
+
return Entityjs::Min.generate(args)
|
|
33
|
+
|
|
31
34
|
when /^(comp|c)$/
|
|
32
35
|
return Entityjs::Comp.generate(args)
|
|
33
36
|
|
|
@@ -37,6 +40,9 @@ module Entityjs
|
|
|
37
40
|
when /^(font|f)$/
|
|
38
41
|
return Entityjs::Font.generate(args)
|
|
39
42
|
|
|
43
|
+
when /^(html)$/
|
|
44
|
+
return Entityjs::Html.generate(args)
|
|
45
|
+
|
|
40
46
|
when /^(version|v|-v)$/
|
|
41
47
|
puts 'EntityJS V'+Entityjs::VERSION
|
|
42
48
|
return 0
|
|
@@ -44,19 +50,19 @@ module Entityjs
|
|
|
44
50
|
when /^(help|h|-h)$/
|
|
45
51
|
puts ""
|
|
46
52
|
puts '---- Commands ----'
|
|
47
|
-
puts '
|
|
48
|
-
puts '
|
|
49
|
-
puts '
|
|
50
|
-
puts '
|
|
51
|
-
puts '
|
|
52
|
-
puts '
|
|
53
|
-
puts '
|
|
54
|
-
puts '
|
|
55
|
-
puts '
|
|
56
|
-
puts '
|
|
57
|
-
puts '
|
|
58
|
-
puts '
|
|
59
|
-
puts '
|
|
53
|
+
puts 'new [name]'
|
|
54
|
+
puts 'new [name] [template]'
|
|
55
|
+
puts 'templates'
|
|
56
|
+
puts 'comp [name]'
|
|
57
|
+
puts 'test [name]'
|
|
58
|
+
puts 'test [name] [tests]+'
|
|
59
|
+
puts 'font [name] (soon...)'
|
|
60
|
+
puts 'release'
|
|
61
|
+
puts 'html'
|
|
62
|
+
puts 'build'
|
|
63
|
+
puts 'server'
|
|
64
|
+
puts 'help'
|
|
65
|
+
puts 'version'
|
|
60
66
|
return 0
|
|
61
67
|
|
|
62
68
|
end
|
|
@@ -6,7 +6,7 @@ module Entityjs
|
|
|
6
6
|
|
|
7
7
|
class Build
|
|
8
8
|
|
|
9
|
-
def self.generate(
|
|
9
|
+
def self.generate(args=nil)
|
|
10
10
|
|
|
11
11
|
if !Dirc.game?
|
|
12
12
|
return 2
|
|
@@ -14,63 +14,63 @@ module Entityjs
|
|
|
14
14
|
|
|
15
15
|
Config.instance.reload
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
name = "build-#{date}"
|
|
20
|
-
else
|
|
21
|
-
name = name.first
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
builds_folder = Config.builds_folder
|
|
25
|
-
assets_folder = Config.assets_folder
|
|
17
|
+
build_folder = Config.instance.build_path
|
|
18
|
+
assets_folder = Config.instance.build_assets_path
|
|
26
19
|
images_folder = Config.images_folder
|
|
27
20
|
sounds_folder = Config.sounds_folder
|
|
28
21
|
scripts_folder = Config.scripts_folder
|
|
29
22
|
|
|
30
|
-
final_name = '
|
|
23
|
+
final_name = Config.instance.build_name+'.js'
|
|
31
24
|
html_name = 'play.html'
|
|
32
25
|
|
|
26
|
+
puts "Building to #{build_folder}"
|
|
27
|
+
|
|
33
28
|
#build if it doesn't exist
|
|
34
|
-
Dirc.create_dir(
|
|
35
|
-
|
|
36
|
-
#create new directory
|
|
37
|
-
if File.directory?(name)
|
|
38
|
-
return 3
|
|
39
|
-
end
|
|
29
|
+
Dirc.create_dir(build_folder, true)
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
#clear directory
|
|
32
|
+
#FileUtils.rm_rf("#{build_folder}/.", :secure=> true)
|
|
42
33
|
|
|
43
|
-
|
|
44
|
-
Dir.chdir(name)
|
|
34
|
+
assets_root = Dirc.game_root+'/'+Config.assets_folder
|
|
45
35
|
|
|
46
36
|
#copy everything inside the assets folder
|
|
47
|
-
puts "Copying assets folder"
|
|
48
|
-
FileUtils.cp_r assets_root, assets_folder
|
|
37
|
+
puts "Copying assets folder to #{assets_folder}"
|
|
38
|
+
FileUtils.cp_r assets_root+'/.', assets_folder
|
|
49
39
|
|
|
50
40
|
#append all files into one big file
|
|
51
|
-
puts "Compiling
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
scripts = self.compile_scripts(Config.instance.scripts_ignore, Config.instance.scripts_order)
|
|
55
|
-
|
|
56
|
-
out = entity_src+scripts
|
|
41
|
+
puts "Compiling scripts"
|
|
42
|
+
|
|
43
|
+
out = self.compile_game
|
|
57
44
|
|
|
45
|
+
puts "Minifying scripts"
|
|
46
|
+
|
|
47
|
+
out = self.minify(out)
|
|
48
|
+
|
|
49
|
+
puts "Minifying styles"
|
|
50
|
+
|
|
51
|
+
css = self.minify_styles(self.compile_styles(Config.instance.build_styles_ignore))
|
|
52
|
+
|
|
58
53
|
#minify
|
|
59
54
|
puts "Almost done..."
|
|
60
|
-
|
|
55
|
+
|
|
61
56
|
#save
|
|
62
57
|
File.open(final_name, 'w') do |f|
|
|
63
58
|
|
|
64
|
-
f.write(
|
|
65
|
-
|
|
66
|
-
f.close
|
|
59
|
+
f.write(out)
|
|
67
60
|
end
|
|
68
61
|
|
|
69
|
-
#
|
|
70
|
-
|
|
62
|
+
#save css
|
|
63
|
+
File.open(Config.instance.build_styles_path+"/"+Config.instance.build_styles_name+'.css', 'w') do |f|
|
|
64
|
+
f.write(css)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if Config.instance.build_ignore_play.nil?
|
|
69
|
+
#create play.html
|
|
70
|
+
puts "Creating play page"
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
#create play.html code
|
|
73
|
+
play_code = %Q(<!DOCTYPE html>
|
|
74
74
|
<html>
|
|
75
75
|
<head>
|
|
76
76
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
|
@@ -80,13 +80,25 @@ module Entityjs
|
|
|
80
80
|
<canvas id='#{Config.instance.canvas_id}' width='#{Config.instance.width}' height='#{Config.instance.height}'>Error browser does not support canvas element.</canvas>
|
|
81
81
|
</body>
|
|
82
82
|
</html>
|
|
83
|
-
)
|
|
84
|
-
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
#check if local play.html exists
|
|
86
|
+
if Dirc::exists?('play.html')
|
|
87
|
+
#create js for html
|
|
88
|
+
js = "<script src='#{final_name}' type='text/javascript'></script>"
|
|
89
|
+
play_code = Page::render_play_page(:js=>js)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
File.open(html_name, 'w') do |f|
|
|
93
|
+
f.write(play_code)
|
|
94
|
+
end
|
|
95
|
+
else
|
|
96
|
+
puts "Ignoring play.html"
|
|
85
97
|
end
|
|
86
98
|
|
|
87
|
-
puts "
|
|
99
|
+
puts "Build Complete!"
|
|
88
100
|
puts "Build is at"
|
|
89
|
-
puts " #{
|
|
101
|
+
puts " #{File.expand_path(build_folder)}"
|
|
90
102
|
|
|
91
103
|
Dirc.to_game_root
|
|
92
104
|
|
|
@@ -104,7 +116,7 @@ module Entityjs
|
|
|
104
116
|
end
|
|
105
117
|
|
|
106
118
|
#add version
|
|
107
|
-
out = out.gsub(
|
|
119
|
+
out = out.gsub(/RE_VERSION/, Entityjs::VERSION)
|
|
108
120
|
|
|
109
121
|
return out
|
|
110
122
|
end
|
|
@@ -123,7 +135,23 @@ module Entityjs
|
|
|
123
135
|
|
|
124
136
|
return out
|
|
125
137
|
end
|
|
126
|
-
|
|
138
|
+
|
|
139
|
+
def self.compile_styles(ignore = nil)
|
|
140
|
+
styles = Dirc.find_styles(ignore)
|
|
141
|
+
|
|
142
|
+
out = ''
|
|
143
|
+
|
|
144
|
+
styles.each do |i|
|
|
145
|
+
out += IO.read(i)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
return Config.preprocess(out)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def self.minify_styles(styles)
|
|
152
|
+
return CSSMin.minify(styles)
|
|
153
|
+
end
|
|
154
|
+
|
|
127
155
|
#compiles all game source and returns it
|
|
128
156
|
def self.compile_scripts(ignore = nil, order=nil)
|
|
129
157
|
#find with short urls for proper data processing
|
|
@@ -137,21 +165,41 @@ module Entityjs
|
|
|
137
165
|
out += "\n"
|
|
138
166
|
end
|
|
139
167
|
|
|
168
|
+
out = Config.preprocess(out)
|
|
169
|
+
|
|
140
170
|
#add js config
|
|
141
171
|
out += self.js_config
|
|
142
172
|
|
|
143
173
|
return out
|
|
144
174
|
end
|
|
145
175
|
|
|
176
|
+
def self.compile_game
|
|
177
|
+
|
|
178
|
+
entity_src = self.compile_entity(Config.instance.build_entity_ignore+Config.instance.entity_ignore)
|
|
179
|
+
scripts = self.compile_scripts(Config.instance.build_scripts_ignore+Config.instance.scripts_ignore, Config.instance.scripts_order)
|
|
180
|
+
|
|
181
|
+
self.build_wrap(entity_src+scripts)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def self.build_wrap(code)
|
|
185
|
+
|
|
186
|
+
head = Config.instance.build_head
|
|
187
|
+
foot = Config.instance.build_foot
|
|
188
|
+
|
|
189
|
+
return head+code+foot
|
|
190
|
+
end
|
|
191
|
+
|
|
146
192
|
#minifies source and returns it
|
|
147
|
-
def self.minify(code,
|
|
193
|
+
def self.minify(code, ops={})
|
|
194
|
+
ops[:copyright] ||= false
|
|
195
|
+
ops[:license] ||= true
|
|
148
196
|
|
|
149
|
-
code = Uglifier.compile(code, :copyright=>
|
|
197
|
+
code = Uglifier.compile(code, :copyright=>ops[:copyright])
|
|
150
198
|
|
|
151
199
|
#add entity license statement
|
|
152
|
-
if license.is_a? String
|
|
153
|
-
code = license + code
|
|
154
|
-
elsif license
|
|
200
|
+
if ops[:license].is_a? String
|
|
201
|
+
code = ops[:license] + code
|
|
202
|
+
elsif !ops[:license].nil?
|
|
155
203
|
code = Config.instance.license + code
|
|
156
204
|
end
|
|
157
205
|
|
|
@@ -159,7 +207,7 @@ module Entityjs
|
|
|
159
207
|
end
|
|
160
208
|
|
|
161
209
|
def self.js_config(path = nil, images = nil, sounds = nil, canvas = nil)
|
|
162
|
-
path ||= '
|
|
210
|
+
path ||= Config.assets_folder+'/'
|
|
163
211
|
images ||= self.images_to_js
|
|
164
212
|
sounds ||= self.sounds_to_js
|
|
165
213
|
canvas ||= Config.instance.canvas_id
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Entityjs
|
|
2
|
+
|
|
3
|
+
class Html
|
|
4
|
+
|
|
5
|
+
def self.generate(name='')
|
|
6
|
+
if !Dirc.game?
|
|
7
|
+
return 2
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
puts "Creating HTML files"
|
|
11
|
+
|
|
12
|
+
play = 'play.html'
|
|
13
|
+
test = 'test.html'
|
|
14
|
+
|
|
15
|
+
if File.exists?(play) || File.exists?(test)
|
|
16
|
+
return 3
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
FileUtils.cp Entityjs::public_path+'/'+play, play
|
|
20
|
+
FileUtils.cp Entityjs::public_path+'/'+test, test
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
puts "Created #{play}"
|
|
24
|
+
puts "Created #{test}"
|
|
25
|
+
|
|
26
|
+
return 0
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module Entityjs
|
|
2
|
+
|
|
3
|
+
class Min
|
|
4
|
+
|
|
5
|
+
def self.generate(args=nil)
|
|
6
|
+
|
|
7
|
+
if !Dirc.game?
|
|
8
|
+
return 2
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
Config.instance.reload
|
|
12
|
+
|
|
13
|
+
final_name = Config.instance.build_name+'.js'
|
|
14
|
+
path = Config.instance.build_path+'/'+final_name
|
|
15
|
+
|
|
16
|
+
puts "Compiling code"
|
|
17
|
+
|
|
18
|
+
out = Build.compile_game
|
|
19
|
+
|
|
20
|
+
puts "Minifying"
|
|
21
|
+
|
|
22
|
+
out = Build.minify(out)
|
|
23
|
+
|
|
24
|
+
puts "Writing to #{path}"
|
|
25
|
+
|
|
26
|
+
File.open(path, 'w') do |f|
|
|
27
|
+
f.write(out)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
puts "Done"
|
|
31
|
+
|
|
32
|
+
return 0
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
|
@@ -22,16 +22,22 @@ module Entityjs
|
|
|
22
22
|
|
|
23
23
|
get '/' do
|
|
24
24
|
|
|
25
|
-
Page.
|
|
25
|
+
Page.render_play_page()
|
|
26
26
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
get '/
|
|
29
|
+
get '/test' do
|
|
30
30
|
|
|
31
|
-
Page.
|
|
31
|
+
Page.render_test_page()
|
|
32
32
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
get '/favicon.ico' do
|
|
36
|
+
content_type 'image/ico'
|
|
37
|
+
|
|
38
|
+
Page.render_favicon
|
|
39
|
+
end
|
|
40
|
+
|
|
35
41
|
#entity source code
|
|
36
42
|
get '/entityjs/*' do
|
|
37
43
|
content_type 'text/javascript'
|