-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pacman.html
340 lines (331 loc) · 9.97 KB
/
Pacman.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>-</title>
<meta charset="utf-8" />
<style>
body {
-moz-animation: preload 1s ease 1 normal forwards;
-o-animation: preload 1s ease 1 normal forwards;
-webkit-animation: preload 1s ease 1 normal forwards;
animation: preload 1s ease 1 normal forwards;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
cursor: default;
font-family: 'Microsoft YaHei';
font-size: 2vh;
}
.centered {
position: absolute;
top: 50%;
left: 50%;
text-align: center;
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
body > section {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#sLoading figure {
-moz-animation: beating 1.5s ease infinite alternate;
-o-animation: beating 1.5s ease infinite alternate;
-webkit-animation: beating 1.5s ease infinite alternate;
animation: beating 1.5s ease infinite alternate;
font-weight: bold;
font-size: 2em;
color: white;
}
@-moz-keyframes preload {
from {
background-color: white;
}
to {
background-color: black;
}
}
@-webkit-keyframes preload {
from {
background-color: white;
}
to {
background-color: black;
}
}
@keyframes preload {
from {
background-color: white;
}
to {
background-color: black;
}
}
@keyframes beating {
from {
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
to {
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
}
@-moz-keyframes beating {
from {
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
to {
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
}
@-webkit-keyframes beating {
from {
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
to {
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
}
</style>
</head>
<body>
<svg style="display: none" viewBox="0 0 1 1">
<defs>
<g id="svgNameBorder">
<polygon points="0 0, 0 0.5, 0.02 0.1, 0.1 0"></polygon>
<polygon points="1 1, 1 0.5, 0.98 0.9, 0.9 1"></polygon>
</g>
</defs>
</svg>
<button id="btnReloadCSS" onclick="document.getElementById('lnkCSS').href += Math.random()">重新载入CSS</button>
<section id="sLoading">
<div class="centered">
<figure>正在载入资源,请稍候……</figure>
<progress id="prgbarLoading"></progress>
</div>
</section>
<section id="sIntro" style="display: none">
<div class="centered">
<figure class="intro-circle outer" data-child-centered>
<p>AILab Presents</p>
</figure>
</div>
<div class="centered perspective">
<figure class="intro-circle inner" data-child-centered>
<p>AILab Presents</p>
</figure>
</div>
<figure class="special-thanks" data-text-shattered>
Designed by zhouhy & zys
</figure>
<div class="centered">
<figure class="intro-line">
<figure class="intro-line-fill"></figure>
<div class="border t"></div>
<div class="border r"></div>
<div class="border b"></div>
<div class="border l"></div>
<div class="intro-title" data-text-shattered>
吃豆人
</div>
</figure>
</div>
</section>
<section id="sGameScene" style="display: none">
<div class="canvas-container push-left">
<figure class="letterbox top"></figure>
<figure class="letterbox bottom"></figure>
<canvas id="mainCanvas"></canvas>
<div id="lblFloatingInfo">...</div>
<figure class="bubble p0"><span class="content">...</span></figure>
<figure class="bubble p1"><span class="content">...</span></figure>
<figure class="bubble p2"><span class="content">...</span></figure>
<figure class="bubble p3"><span class="content">...</span></figure>
<div id="dResult" data-child-centered>
<div class="infobox-container">
<header>游戏结束</header>
</div>
</div>
<div id="panControl">
<a class="control stay" onclick="engine.submitDirection(Direction.stay)">不动</a>
<a class="control direction up" onclick="engine.submitDirection(Direction.up)"><span class="icon-up-big"></span></a>
<a class="control direction right" onclick="engine.submitDirection(Direction.right)"><span class="icon-up-big"></span></a>
<a class="control direction down" onclick="engine.submitDirection(Direction.down)"><span class="icon-up-big"></span></a>
<a class="control direction left" onclick="engine.submitDirection(Direction.left)"><span class="icon-up-big"></span></a>
</div>
<input id="txtTaunt" type="text" maxlength="20" placeholder="选择方向前,可输入叫嚣文字" />
<figure class="strength-delta p0">+1</figure>
<figure class="strength-delta p1">+1</figure>
<figure class="strength-delta p2">+1</figure>
<figure class="strength-delta p3">+1</figure>
<div id="dInfoboxContainer" class="infobox-container">
<div class="misc">
<figure class="turnid value-wrap">
<span class="label">
<span class="icon-clock"></span>
回合
</span>
<span class="value">0</span>
</figure>
<figure class="alivecount value-wrap">
<span class="label">
<span class="icon-child"></span>
存活人数
</span>
<span class="value">4</span>
</figure>
</div>
<template id="tmpInfobox">
<div class="infobox">
<figure class="final-score"></figure>
<div class="infobox-content">
<p class="player-name-wrap">
<svg viewBox="0 0 1 1" preserveAspectRatio="none">
<use xlink:href="#svgNameBorder"></use>
</svg>
<span class="player-name">【玩家姓名】</span>
</p>
<figure class="strength value-wrap">
<span class="label">
<span class="icon-flash"></span>
力量
</span>
<span class="value">1</span>
<span class="powerupamount">
<span class="value">+3</span>
</span>
</figure>
<figure class="remaining value-wrap">
<span class="label">
<span class="icon-hourglass"></span>
增益剩余
</span>
<span class="value">0</span>
</figure>
</div>
<div class="screen-shot-container">
<figure class="screen-shot">
<span class="death-reason"></span><img />
</figure>
</div>
</div>
</template>
</div>
</div>
<fieldset id="panSettings" class="push-left">
<div class="container">
<div class="row">
<label>FPS</label>
<span id="lblFPS">0</span>
</div>
<div class="row">
<label>抗锯齿</label>
<input type="checkbox" id="chkAntiAliasing" onchange="engine.antialiasing = this.checked" />
</div>
<div class="row">
<label>效果等级</label>
<label>
<input id="radHighGraphicsLevel" type="radio" name="graphics" value="1" checked onchange="engine.graphicsLevel = this.value" />
高
</label>
<label>
<input id="radLowGraphicsLevel" type="radio" name="graphics" value="0" onchange="engine.graphicsLevel = this.value" />
低
</label>
</div>
<div class="row">
<label>视角锁定</label>
<input id="chkFixedCamera" type="checkbox" onchange="engine.fixedCamera = this.checked" />
</div>
<div class="row">
<label>正交投影</label>
<input id="chkOrthographic" type="checkbox" onchange="engine.orthographic = this.checked" />
</div>
<div class="row">
<label><span class="icon-music"></span> 声音</label>
<input id="chkSound" type="checkbox" onchange="engine.sound = this.checked" />
</div>
<div class="row">
<label><span class="icon-video"></span> 开场</label>
<input id="chkIntro" type="checkbox" onchange="engine.intro = this.checked" />
</div>
</div>
<a class="show"><span class="icon-cogs"></span> 设置</a>
</fieldset>
<footer class="keymap">
<em>操作说明</em>
<span>回车键</span>
播放暂停/继续
<span>R 键</span>
反向播放
<span>- 键</span>
减速播放
<span>= 键</span>
加速播放
<span>上下左右键</span>
向指定方向移动
<span>空格键</span>
本回合不移动
<span>滚轮</span>
放大/缩小
</footer>
</section>
<script src="player_api.js"></script>
<script>
infoProvider.setSize(0, 600);
</script>
<link id="lnkCSS" href="Pacman/app.min.css?!" rel="stylesheet" />
<script src="/javascripts/jquery-1.9.1.min.js"></script>
<script src="/javascripts/jquery.cookie.js"></script>
<script src="/greensocks/TweenMax.min.js"></script>
<script src="Pacman/es6-promise.min.js"></script>
<script src="Pacman/three.min.js?!"></script>
<script src="Pacman/app.js?!!!!"></script>
<audio id="sndBGM1" src="Pacman/sound/1.ogg"></audio>
<audio id="sndBGM2" src="Pacman/sound/2.ogg"></audio>
<audio id="sndEnd" src="Pacman/sound/end.wav" ></audio>
<audio id="sndEnhance" src="Pacman/sound/enhance.wav" ></audio>
<audio id="sndExclamation" src="Pacman/sound/exclamation.wav" ></audio>
<audio id="sndExplode" src="Pacman/sound/explode.wav" ></audio>
<audio id="sndLosePower" src="Pacman/sound/lose-power.wav" ></audio>
<audio id="sndPick" src="Pacman/sound/pick.wav" ></audio>
<audio id="sndGenerate" src="Pacman/sound/generate.wav"></audio>
<audio id="sndWarp" src="Pacman/sound/warp.wav"></audio>
</body>
</html>