forked from farteryhr/tetr.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·70 lines (63 loc) · 1.98 KB
/
index.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
<!doctype html>
<meta charset=utf-8>
<title>Tetr.js</title>
<link rel=stylesheet href=style.css>
<nav>
<h1>Tetr.js</h1>
<a onclick=init(0)>Play Sprint</a>
<a onclick=init(1)>Play Marathon</a>
<a onclick=init(gametype)>Retry</a> <!-- only show at end in green -->
<a onclick=toggleMenu(settingsMenu)><i class=icon-cog></i>Settings</a>
</nav>
<div id=content>
<!-- Canvases -->
<div id=a>
<canvas id=bgHold></canvas>
<canvas id=hold></canvas>
</div>
<div id=b>
<canvas id=bg></canvas>
<canvas id=stack></canvas>
<canvas id=active></canvas>
<p id=msg>
</div>
<canvas id=progress></canvas>
<div id=c>
<canvas id=bgPreview></canvas>
<canvas id=preview></canvas>
</div>
<!-- Stats -->
<p id=stats>
<p id=lines>
</div>
<!-- Menus -->
<div id=menu style=display:none>
<nav>
<h1>Tetr.js</h1>
<a onclick=toggleMenu(controlsMenu)>Controls</a>
</nav>
<div id=settingsMenu style=display:none>
<h2>Settings</h2>
<div id=settings>
</div>
<a class=button onclick=toggleMenu(settingsMenu)>Done</a>
</div>
<div id=controlsMenu style=display:none>
<h2>Controls</h2>
<p>Click on the control you want to change, then press any key.
<table id=controls>
<tr> <th>Move Left <td id=moveLeft>←
<tr> <th>Move Right <td id=moveRight>→
<tr> <th>Move Down <td id=moveDown>↓
<tr> <th>Hard Drop <td id=hardDrop>Space
<tr> <th>Hold <td id=holdPiece>X
<tr> <th>Spin Right <td id=rotRight>C
<tr> <th>Spin Left <td id=rotLeft>Z
<tr> <th>Spin 180 <td id=rot180>Shift
<tr> <th>Retry <td id=retry>R
</table>
<a class=button onclick=toggleMenu(controlsMenu)>Done</a>
</div>
</div>
<script src=tetris.js></script>
<!--<script>_gaq=[['_setAccount','UA-30472693-1'],['_trackPageview']];(function(d){var g=d.createElement('script'),s=d.scripts[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document)</script>-->