-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
79 lines (67 loc) · 2.01 KB
/
index.html
File metadata and controls
79 lines (67 loc) · 2.01 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
body {
background: black;
color: gray;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
height: 90vh;
font-size: 24px;
font-family: monospace;
}
#virtual-joystick {
position: absolute;
z-index: 999;
left: 20px;
top: 40%;
width: 90px;
height: 90px;
display: flex;
user-select: none;
flex-wrap: wrap;
border-radius: 50%;
overflow: hidden;
transform: rotate(45deg);
display: none;
}
#virtual-joystick div {
opacity: 0.5;
border: 1px solid gray;
width: 50%;
height: 50%;
flex-shrink: 0;
flex-grow: 0;
background: white;
}
#virtual-joystick div:active {
opacity: 0.8;
}
#pause {
display: none;
}
.hidden { display: none; }
</style>
<title>Thunder Lizard: Eat or be eaten</title>
</head>
<body class="bg-black min-h-screen flex items-center justify-center" style="background: black;">
<p id="status">LOADING...</p>
<div id="paused" class="absolute top-10 z-40 leading-4 p-1 text-center text-white bg-black text-sm hidden">PAUSED</div>
<div id="score" class="absolute top-4 z-40 leading-4 p-1 text-center text-orange-500 bg-black"></div>
<div id="game-over" class="absolute bottom-4 leading-4 p-1 z-40 text-center text-red-500 bg-black text-m hidden">GAME OVER! Press Space bar to restart.</div>
<div id="win" class="absolute bottom-4 leading-4 p-1 z-40 text-center text-orange-500 bg-black text-m hidden">Press Space bar to play again.</div>
<script type="module" src="/src/main.ts"></script>
<div id="pause" class="absolute top-4 left-4 w-10 h-10 z-40">⏸︎</div>
<div id="virtual-joystick">
<div id="up"></div>
<div id="right"></div>
<div id="left"></div>
<div id="down"></div>
</div>
</body>
</html>