forked from farteryhr/tetr.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·231 lines (207 loc) · 11.4 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
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0, width=device-width"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Tetr.js</title>
<link rel="stylesheet" href="style.css">
<!--<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-554c83a8661bf358" async="async"></script>-->
</head>
<body>
<!--<canvas id="bg"></canvas>-->
<!--<video id="bg" src=bg.webm loop autoplay></video>-->
<div id="touchOverlay" class="touchoverlay-disabled">
<div class="touchbutton" id="touchLeft" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchRight" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchDown" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchDrop" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchHold" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchRotRight" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchRotLeft" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchRot180" style="display:none"><i class="material-icons"></i></div>
<div class="touchbutton" id="touchLayout" style="display:none"><i class="material-icons"></i></div>
</div>
<div id="content">
<!-- Canvases -->
<div id="d">
<h3>Hold</h3>
<div id="a">
<canvas id="hold"></canvas>
<br/>
<div id="divInp"></div>
</div>
<table id="stats">
<tr>
<th id="score">0</th>
<th>SCORE 分</th>
</tr>
<tr>
<td id="levelline"><div id="level"></div><div id="line">0</div></td>
<th>LINE 行</th>
</tr>
<tr>
<td id="piece">0</td>
<th>PIECE 块</th>
</tr>
<tr>
<th id="penalty"></th>
<th id="time"><canvas></canvas></th>
</tr>
</table>
</div>
<div id="b">
<canvas id="bgStack">请使用最新版的网页浏览器方可正常进行游戏。</canvas>
<canvas id="stack">You need an up-to-date web browser to play this game.</canvas>
<canvas id="active"></canvas>
<div id="msgdiv">
<span id="msg"></span>
</div>
<nav class="menu on">
<h1>Tetr.js - Dig v0.66</h1>
<p>
original: <a class="link" href="//simon.lc/tetr.js/">>>simonlc</a><br/>
enhanced: <a class="link" href="//doktorocelot.com/tetr.js/">>>drocelot</a><br/>
farter's Dig Mod</p>
<div class="btn-container">
<a class="btn" onclick="init(0)" id="btn_first_mode"><i class="material-icons"></i> Sprint 40行竞速</a>
<a class="btn" onclick="init(1)"><i class="material-icons"></i> Marathon 马拉松</a>
<!-- <a class="btn" onclick="init(2)">Play Ultra</a> -->
<a class="btn" onclick="init(3,{digOffset:0})"><i class="material-icons"></i> Dig! 挖掘机</a>
<a class="btn" onclick="init(4,{digraceType:'easy'})"><i class="material-icons"></i> Dig Race 挖掘练习</a>
<a class="btn" onclick="init(5)"><i class="material-icons"></i> Zen 修仙模式</a>
<a class="btn" onclick="menu(2)" id="btnbinds"><i class="material-icons"></i> Controls 调整按键</a>
<a class="btn" onclick="menu(1)"><i class="material-icons"></i> Settings 调整设定</a>
<a class="btn" onclick="menu(6,1)"><i class="material-icons"></i> Replay 录像回放</a>
<!--<a class="btn highlight" onclick="menu(7,1);this.classList.remove('highlight')"><i class="material-icons"></i> Harder 更厉害的</a>-->
</div>
<h1>Tetr.js - Dig</h1>
<p>deep♂dark♂fantasy<br />
when shit happens, hit Ctrl+F5.</p>
<div class="btn-container">
<a class="btn" onclick="init(1,{marathonType:1})">Classic-Fast 高速经典</a>
<a class="btn" onclick="init(3,{digOffset:500})"><i class="material-icons"></i> Dig - 500+</a>
<a class="btn" onclick="init(3,{digOffset:1000})"><i class="material-icons"></i> Dig - 1000+</a>
<a class="btn" onclick="init(3,{digOffset:1500})"><i class="material-icons"></i> Dig - 1500+</a>
<a class="btn" onclick="init(3,{digOffset:2000})"><i class="material-icons"></i> NUKE 核能</a>
<a class="btn" onclick="init(4,{digraceType:'checker'})"><i class="material-icons"></i> Dig Hard 疯狂挖掘</a>
<a class="btn" onclick="init(6)"><i class="material-icons"></i> 20G 瞬降模式</a>
<a class="btn" onclick="init(7)"><i class="material-icons"></i> Dig Zen 沉思挖掘</a>
<div class="btn-line">
<a class="btn btn-inline" style="width:15%;" onclick="init(0,{lineLimit:1})">1</a>
<a class="btn btn-inline" style="width:15%;" onclick="init(0,{lineLimit:4})">4</a>
<a class="btn btn-inline" style="width:33%;" onclick="init(0,{lineLimit:25})">B-TYPE</a>
</div>
<div class="btn-line">
<a class="btn btn-inline" style="width:30%;" onclick="init(0,{lineLimit:100})">100</a>
<a class="btn btn-inline" style="width:39%;" onclick="init(0,{lineLimit:1000})">1000</a>
</div>
<a class="btn" onclick="init(0,{pieceSet:1})">Spr_nt 困难40行</a>
<a class="btn" onclick="init(0,{pieceSet:2})">Heaven 简单40行</a>
<a class="btn" onclick="init(0,{delType:1})">Whole 整块40行 α</a>
<a class="btn" onclick="init(0,{symmetry:1})">Symmetry 对称40行 α</a>
<a class="btn" onclick="init(4,{digraceType:'easy',symmetry:1})">SymmDig 对称挖掘 α</a>
<a class="btn" onclick="init(4,{digraceType:'easy',triplet:1})">Triplet 三消游戏 α</a>
<a class="btn" onclick="init(0,{backFire:2})">Backfire 自攻自受</a>
<div class="btn-line">
<a class="btn btn-inline" style="width:20%;" onclick="init(0,{backFire:2,lineLimit:100})">100</a>
<a class="btn btn-inline" style="width:20%;" onclick="init(0,{backFire:1})">BF1</a>
<a class="btn btn-inline" style="width:23%;" onclick="init(0,{backFire:4})">MAX</a>
</div>
<a class="btn" onclick="init(0,{noRotation:1})">Fixed 无旋转40行</a>
<div class="btn-line">
<a class="btn btn-inline" style="width:39%;" onclick="init(0,{validPos:1})">Fixed lite</a>
<a class="btn btn-inline" style="width:30%;" onclick="init(0,{validPos:2})">kid's</a>
</div>
<a class="btn" onclick="init(0,{fallMode:1})">No Gravity 反重力40行</a>
<a class="btn" onclick="init(0,{isolation:2})">Isolation 对对碰40行 α</a>
<a class="btn" onclick="init(4,{digraceType:'map'})">map dig (wip)</a>
<!--<a class="btn" onclick="menu(void 0,-1)">Back 返回</a>-->
</div>
</nav>
<div class="menu">
<h2>Settings 调整设定</h2>
<div id="settings">
</div>
<div style="clear:both"><a class="btn" onclick="menu(0)">Done 完成</a></div>
</div>
<div class="menu">
<h2>Controls 调整按键</h2>
<p>Click on the item you want to change, then press any key.<br/>
点击要修改的键位,然后按键。</p>
<table id="controls">
<tr><th>Move <i class="material-icons"></i> 左移</th><td id="moveLeft">←</td></tr>
<tr><th>Move <i class="material-icons"></i> 右移</th><td id="moveRight">→</td></tr>
<tr><th>Triple <i class="material-icons"></i> 左三</th><td id="moveLeft3">---</td></tr>
<tr><th>Triple <i class="material-icons"></i> 右三</th><td id="moveRight3">---</td></tr>
<tr><th>Move <i class="material-icons"></i> 软降</th><td id="moveDown">↓</td></tr>
<tr><th>Drop <i class="material-icons"></i> 硬降</th><td id="hardDrop">Space</td></tr>
<tr><th>Hold <i class="material-icons"></i> 暂存</th><td id="holdPiece">C</td></tr>
<tr><th>Spin <i class="material-icons"></i> 右转</th><td id="rotRight">X</td></tr>
<tr><th>Spin <i class="material-icons"></i> 左转</th><td id="rotLeft">Z</td></tr>
<tr><th>Spin <i class="material-icons"></i> 半周转</th><td id="rot180">Shift</td></tr>
<tr><th>Retry <i class="material-icons"></i> 重来</th><td id="retry">R</td></tr>
<tr><th>Pause <i class="material-icons"></i> 暂停</th><td id="pause">Esc</td></tr>
</table>
<a class="btn btn-bottom" onclick="menu(0);document.getElementById('btnbinds').classList.remove('highlight');">Done 完成</a>
</div>
<nav id="go" class="menu">
<div class="btn-container btn-container-bottom">
<a class="btn" onclick="init(gametype,gameparams)">Retry 再来</a>
<div class="btn-line">
<a class="btn btn-inline" onclick="init('replay')" style="width: 50%;">Replay 回放 </a>
<a class="btn btn-inline" onclick="showreplaydata(curreplaydata())" style="width: 20%"><i class="material-icons"></i></a>
</div>
<a class="btn highlight" onclick="menu(5,1);this.classList.remove('highlight')">Rankings 排行</a>
<a class="btn" onclick="menu(0)">Back 回菜单</a>
</div>
</nav>
<nav id="pause" class="menu">
<div class="btn-container btn-container-bottom">
<a class="btn" onclick="unpause()">Return 继续</a>
<a class="btn" onclick="init(gametype,gameparams)">Retry 重来</a>
<a class="btn" onclick="menu(0)">Back 回菜单</a>
</div>
</nav>
<div id="leader" class="menu">
<h2>Rankings 排行</h2>
<div id="leaderboard"></div>
<div style="clear:both"><a class="btn" onclick="menu(void 0,-1)">Back 返回</a></div>
</div>
<nav id="replay" class="menu">
<h2>Replay 回放数据</h2>
<p>Ctrl+C 复制 / Ctrl+V 粘贴</p>
<textarea id="replaydata" spellcheck="false"></textarea>
<ul>
<li><a class="btn" onclick="tryreplaydata()">Watch 观看</a></li>
<li><a class="btn" onclick="menu(void 0,-1)">Back 返回</a></li>
</ul>
</nav>
<nav class="menu">
</nav>
</div>
<div id="c">
<h3>Next</h3>
<canvas id="preview"></canvas>
</div>
</div>
<div style="display:none;" id="divdebug">debug</div>
<canvas id="sprite"></canvas>
<script type="text/javascript" src="bigmin.js"></script>
<script type="text/javascript" src="polyfill.js"></script>
<script type="text/javascript" src="data.js"></script>
<script type="text/javascript" src="tetris.js"></script>
<script type="text/javascript" src="piece.js"></script>
<script type="text/javascript" src="stack.js"></script>
<script type="text/javascript" src="hold.js"></script>
<script type="text/javascript" src="preview.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="bg.js"></script>
<script type="text/javascript" src="ranking.js"></script>
<script type="text/javascript" src="compress.js"></script>
<script type="text/javascript" src="sound.js"></script>
<script type="text/javascript" src="touch.js"></script>
<!--<script type="text/javascript" src="http://cdn.jsdelivr.net/npm/eruda" onload="eruda.init()"></script>-->
</body>
</html>