-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
275 lines (261 loc) · 7.17 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,user-scalable=no"
/>
<meta
name="description"
content="Ubur.io is an open source fake online game."
/>
<style>
html,
body {
margin: 0;
padding: 0;
height: 100%;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 16px;
overflow: hidden;
}
body,
div,
input,
button {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
.full {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
user-select: none;
}
@keyframes title-letter-animation {
0% {
transform: rotateZ(0deg);
}
25% {
transform: rotateZ(-10deg);
}
75% {
transform: rotateZ(10deg);
}
100% {
transform: rotateZ(0deg);
}
}
.title-text span {
display: inline-block;
animation: title-letter-animation 3s infinite;
}
.title-text span:nth-child(1) {
animation-delay: 1s;
}
.title-text span:nth-child(2) {
animation-delay: 1.25s;
animation-direction: reverse;
}
.title-text span:nth-child(3) {
animation-delay: 1.5s;
}
.title-text span:nth-child(4) {
animation-delay: 1.75s;
animation-direction: reverse;
}
.title-text span:nth-child(5) {
animation-delay: 2s;
}
.title-text span:nth-child(6) {
animation-delay: 2.25s;
animation-direction: reverse;
}
.title-text span:nth-child(7) {
animation-delay: 2.5s;
}
</style>
<title>Ubur.io</title>
</head>
<body>
<canvas id="world-canvas" class="full"></canvas>
<canvas id="name-canvas" class="full"></canvas>
<div style="position: absolute; user-select: none; top: 1rem; right: 1rem">
<button
id="hs-button"
type="button"
title="Show/Hide Highscore"
style="
cursor: pointer;
border-radius: 1rem;
letter-spacing: 0.1em;
border: 1px solid black;
background: white;
"
>
...
</button>
</div>
<div
style="
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
user-select: none;
"
>
<div
id="title-ui"
style="
position: absolute;
width: 640px;
height: 960px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transform-origin: center;
"
>
<div
class="title-text"
style="
font-size: 8rem;
font-weight: bold;
color: white;
-webkit-text-stroke: 4px black;
transform: scaleX(1.2);
"
>
<span>U</span><span>b</span><span>u</span><span>r</span><span>.</span
><span>i</span><span>o</span>
</div>
<div style="width: 100%; padding: 2rem">
<div>
<input
id="name-input"
type="text"
placeholder="Enter your name"
maxlength="15"
style="
width: 100%;
font-size: 2rem;
padding: 1rem;
text-align: center;
letter-spacing: 0.1em;
border: 2px solid black;
font-weight: bold;
outline: 0;
background: #eee;
border-radius: 4rem;
"
/>
</div>
<div
style="
margin-top: 2rem;
display: flex;
align-items: center;
justify-content: center;
"
>
<button
id="play-button"
type="button"
style="
display: block;
width: 100%;
padding: 1rem;
font-size: 2rem;
font-weight: bold;
cursor: pointer;
border: 0.25rem solid black;
border-radius: 1rem;
background: #666;
color: white;
letter-spacing: 0.1em;
"
>
Play
</button>
</div>
<div
style="
margin-top: 2rem;
background: white;
border: 2px solid black;
padding: 1rem;
border-radius: 1rem;
"
>
<h3
style="
width: 100%;
text-align: center;
margin: 0;
padding: 0;
font-size: 1.2rem;
letter-spacing: 0.1em;
"
>
How to play
</h3>
<ul
style="
margin-top: 1rem;
padding-left: 0;
line-height: 1.5;
letter-spacing: 0.05em;
list-style-type: none;
"
>
<li style="display: flex; align-items: center">
<div style="color: green; font-size: 1.5rem">⚡</div>
<div style="margin-left: 1rem">
Click anywhere on the screen to shoot. You will move to the
direction opposite of where you shot.
</div>
</li>
<li
style="margin-top: 0.5rem; display: flex; align-items: center"
>
<div style="color: green; font-size: 1.5rem">⛓</div>
<div style="margin-left: 1rem">
The circles with name are players. If 2 players collide, the
bigger one will absorb the smaller one.
</div>
</li>
<li
style="margin-top: 0.5rem; display: flex; align-items: center"
>
<div style="color: green; font-size: 1.5rem">🌮</div>
<div style="margin-left: 1rem">
The circles without name are foods. If a player collide with a
food, the player always absorb the food regardless of size.
</div>
</li>
<li
style="margin-top: 0.5rem; display: flex; align-items: center"
>
<div style="color: green; font-size: 1.5rem">⚫</div>
<div style="margin-left: 1rem">
Beware of the black circles. They can absord anyone touching
them.
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<script type="module" src="/src/index.ts"></script>
</body>
</html>