-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
64 lines (60 loc) · 1.72 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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
</head>
<body>
<style>
body {
font-family: YuGothic;
font-size: 18px;
font-weight: 500;
color: #333;
}
.info {
padding: 2px;
font-size: 18px;
position: absolute;
top: 100px;
right: 60px;
background-color: #f0f0f070;
}
</style>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="module" src="src/index.ts"></script>
<script>
document.body.onclick = function () {
if (this.webkitRequestFullScreen) {
this.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
else if (this.mozRequestFullScreen) {
this.mozRequestFullScreen();
}
else if (this.msRequestFullscreen) {
this.msRequestFullscreen();
}
else {
alert("not found")
}
this.requestPointerLock = this.requestPointerLock || this.mozRequestPointerLock || this.webkitRequestPointerLock;
this.requestPointerLock();
}
</script>
<div class="info">
<div>
Control<br>
W,S: Move forward, Move backward<br>
A,D: Move left, Move right<br>
Space: Jump<br>
Mouse: Look control<br>
Click: Break a block
</div>
<div style="font-size:10px;">
<div id="2d"></div>
<div id="time"></div>
<div id="debug1"></div>
<div id="debug2"></div>
</div>
</div>
</body>
</html>