-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
344 lines (328 loc) · 13.8 KB
/
index.html
File metadata and controls
344 lines (328 loc) · 13.8 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
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>cssQuake - Quake rendered with HTML and CSS</title>
<meta
name="description"
content="Play Quake shareware maps rendered as real DOM geometry with HTML, CSS transforms, and PolyCSS."
/>
<meta name="robots" content="index, follow" />
<link rel="canonical" href="https://cssquake.wtf/" />
<meta property="og:site_name" content="cssQuake" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://cssquake.wtf/" />
<meta property="og:title" content="cssQuake - Quake rendered with HTML and CSS" />
<meta
property="og:description"
content="Play Quake shareware maps rendered as real DOM geometry with HTML, CSS transforms, and PolyCSS."
/>
<meta property="og:image" content="https://cssquake.wtf/assets/cssquake-social.png" />
<meta property="og:image:width" content="1664" />
<meta property="og:image:height" content="803" />
<meta property="og:image:alt" content="cssQuake gameplay and inspectable DOM mesh markup." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="cssQuake - Quake rendered with HTML and CSS" />
<meta
name="twitter:description"
content="Play Quake shareware maps rendered as real DOM geometry with HTML, CSS transforms, and PolyCSS."
/>
<meta name="twitter:image" content="https://cssquake.wtf/assets/cssquake-social.png" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "cssQuake",
"url": "https://cssquake.wtf/",
"description": "Play Quake shareware maps rendered as real DOM geometry with HTML, CSS transforms, and PolyCSS.",
"applicationCategory": "GameApplication",
"operatingSystem": "Any",
"image": "https://cssquake.wtf/assets/cssquake-social.png",
"codeRepository": "https://github.com/LayoutitStudio/cssQuake"
}
</script>
<link rel="icon" href="/src/assets/favicon-16.png" type="image/png" sizes="16x16" />
<link rel="icon" href="/src/assets/favicon-32.png" type="image/png" sizes="32x32" />
<style>
html,
body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
background: #050505;
}
#quake-app {
position: fixed;
inset: 0;
min-width: 0;
min-height: 0;
overflow: hidden;
background: #050505;
isolation: isolate;
}
#quake-host,
#quake-viewmodel-layer,
#quake-hud {
position: absolute;
inset: 0;
}
#quake-host {
z-index: 1;
}
#quake-viewmodel-layer {
z-index: 2;
}
#quake-hud {
z-index: 3;
}
.cssquake-logo {
position: absolute;
top: 14px;
left: 14px;
z-index: 40;
display: block;
width: auto;
height: min(45px, calc((100vw - 92px) * 0.1605));
opacity: 1;
image-rendering: pixelated;
pointer-events: none;
user-select: none;
}
.cssquake-version {
position: absolute;
top: calc(14px + min(16px, calc((100vw - 92px) * 0.0578)));
left: calc(22px + min(281px, calc((100vw - 92px) * 0.9)));
z-index: 40;
color: #ffffff;
font: 400 12px/1 ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
letter-spacing: 0;
opacity: 0.4;
text-shadow: 0 1px 0 #000000;
pointer-events: none;
user-select: none;
}
#quake-loading-overlay {
position: absolute;
inset: 0;
z-index: 30;
display: grid;
place-items: center;
padding: 24px;
background: #050505;
color: #f6f1df;
pointer-events: auto;
user-select: none;
cursor: progress;
}
#quake-loading-overlay[hidden] {
display: none;
}
.btn-github,
.quake-copyright-notice {
z-index: 40;
}
.quake-loading-mark {
position: relative;
display: grid;
place-items: center;
width: min(960px, calc(100vw - 32px), calc(160dvh - 52px));
aspect-ratio: 320 / 200;
}
.quake-loading-mark::before {
display: none;
content: none;
}
.quake-loading-mark > * {
position: relative;
z-index: 1;
}
#quake-loading-status {
display: flex;
align-items: center;
justify-content: center;
gap: 24px;
min-height: 60px;
color: #f0ad5c;
font: 700 14px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
letter-spacing: 0;
text-transform: uppercase;
text-shadow: 0 2px 0 #000000;
}
#quake-loading-status::before {
content: "";
display: block;
flex: 0 0 auto;
width: 40px;
height: 60px;
background-image: url("/q/main-menu-cursor.png");
background-repeat: no-repeat;
background-position: 0 0;
background-size: 600% 100%;
image-rendering: pixelated;
}
#quake-loading-status .quake-bitmap-text {
justify-content: center;
}
</style>
</head>
<body>
<main id="quake-app">
<div id="quake-host" tabindex="0"></div>
<div id="quake-viewmodel-layer" aria-hidden="true"></div>
<img class="cssquake-logo" src="/src/assets/cssquake-logo.png" width="1383" height="222" alt="cssQuake" />
<span id="cssquake-version" class="cssquake-version" aria-hidden="true"></span>
<button id="quake-audio-toggle" type="button" aria-label="Unmute audio" aria-pressed="true" title="Unmute audio (M)" data-muted="true">
(M)ute Audio
</button>
<div id="quake-hud">
<button id="quake-main-menu" type="button" aria-label="cssQuake menu" hidden>
<span id="quake-main-menu-art" aria-hidden="true">
<span id="quake-main-menu-active-row"></span>
<span id="quake-main-menu-cursor"></span>
</span>
</button>
<section id="quake-level-panel" class="quake-menu-panel" role="dialog" aria-labelledby="quake-level-title" tabindex="-1" hidden>
<div id="quake-level-card" class="quake-menu-card" role="document">
<header class="quake-menu-panel-header">
<h1 id="quake-level-title" class="quake-menu-panel-title" data-bm="label alt">
Select Level
</h1>
</header>
<div id="quake-level-list" class="quake-level-list" aria-label="Available levels"></div>
<nav id="quake-level-actions" class="quake-menu-actions" aria-label="Level actions">
<button id="quake-level-back" type="button" data-bm="label alt">Back</button>
</nav>
</div>
</section>
<section id="quake-about-panel" class="quake-menu-panel" role="dialog" aria-labelledby="quake-about-title" tabindex="-1" hidden>
<div id="quake-about-card" class="quake-menu-card" role="document">
<header class="quake-menu-panel-header">
<h1 id="quake-about-title" class="quake-menu-panel-title">
<img src="/q/menu-title-help.png" width="75" height="20" alt="Help" />
</h1>
<p data-bm>
cssQuake turns BSP maps into real DOM geometry through PolyCSS.
</p>
<p data-bm>
Textures, baked light, and camera movement are handled with CSS transforms.
</p>
<p data-bm>
Gameplay stays Quake-like: collision, triggers, doors, pickups, HUD, and weapons.
</p>
</header>
<nav id="quake-about-source-links" class="quake-menu-links" aria-label="Project source links">
<ul>
<li><a href="https://github.com/LayoutitStudio/polycss" target="_blank" rel="noopener noreferrer" data-bm="label alt">3D engine: PolyCSS</a></li>
<li><a href="https://github.com/id-Software/Quake" target="_blank" rel="noopener noreferrer" data-bm="label alt">Source: Quake</a></li>
<li><a href="mailto:minotopo@gmail.com" data-bm="label alt email">Contact: minotopo@gmail.com</a></li>
</ul>
</nav>
<nav id="quake-about-actions" class="quake-menu-actions" aria-label="Help actions">
<button id="quake-about-back" type="button" data-bm="label alt">Back</button>
</nav>
</div>
</section>
<section id="quake-options-panel" class="quake-menu-panel" role="dialog" aria-labelledby="quake-options-title" tabindex="-1" hidden>
<div id="quake-options-card" class="quake-menu-card" role="document">
<header class="quake-menu-panel-header">
<h1 id="quake-options-title" class="quake-menu-panel-title">
<img src="/q/menu-title-options.png" width="124" height="20" alt="Options" />
</h1>
<p data-bm>
Move with the keyboard. Aim and fire with the mouse.
</p>
</header>
<div id="quake-options-sections" class="quake-menu-panel-sections">
<section aria-labelledby="quake-options-controls-title">
<h2 id="quake-options-controls-title" data-bm="label alt">Controls</h2>
<ul class="quake-help-list">
<li>
<span class="quake-help-keys"><kbd data-bm="key alt">W</kbd><kbd data-bm="key alt">A</kbd><kbd data-bm="key alt">S</kbd><kbd data-bm="key alt">D</kbd></span>
<span data-bm="label">Move</span>
</li>
<li>
<span class="quake-help-keys"><kbd data-bm="key alt">Mouse</kbd></span>
<span data-bm="label">Look</span>
</li>
<li>
<span class="quake-help-keys"><kbd data-bm="key alt">Click</kbd></span>
<span data-bm="label">Fire and use</span>
</li>
<li>
<span class="quake-help-keys"><kbd data-bm="key alt">Space</kbd></span>
<span data-bm="label">Jump</span>
</li>
<li>
<span class="quake-help-keys"><kbd data-bm="key alt">Esc</kbd></span>
<span data-bm="label">Open menu</span>
</li>
<li>
<span class="quake-help-keys"><kbd data-bm="key alt">M</kbd></span>
<span data-bm="label">Mute audio</span>
</li>
</ul>
</section>
</div>
<nav id="quake-options-actions" class="quake-menu-actions" aria-label="Options actions">
<button id="quake-options-back" type="button" data-bm="label alt">Back</button>
</nav>
</div>
</section>
<div id="quake-crosshair" aria-hidden="true"></div>
<div id="quake-classic-hud" aria-label="Quake status bar">
<img id="quake-classic-hud-image" src="/q/hud.png" width="320" height="24" alt="" />
<div id="quake-hud-frame" aria-hidden="true">
<span class="quake-hud-sprite quake-hud-sprite-shells"></span>
</div>
<div id="quake-hud-values" aria-hidden="true">
<span id="quake-hud-armor-value" class="quake-hud-readout quake-hud-readout-armor">
<span class="quake-hud-digit"></span>
<span class="quake-hud-digit"></span>
<span class="quake-hud-digit" data-digit="0"></span>
</span>
<span id="quake-hud-health-value" class="quake-hud-readout quake-hud-readout-health">
<span class="quake-hud-digit" data-digit="1"></span>
<span class="quake-hud-digit" data-digit="0"></span>
<span class="quake-hud-digit" data-digit="0"></span>
</span>
<span id="quake-hud-ammo-value" class="quake-hud-readout quake-hud-readout-ammo">
<span class="quake-hud-digit"></span>
<span class="quake-hud-digit" data-digit="2"></span>
<span class="quake-hud-digit" data-digit="5"></span>
</span>
<span id="quake-hud-keys-value" class="quake-hud-keys">
<span class="quake-hud-key quake-hud-key-silver" data-label="S"></span>
<span class="quake-hud-key quake-hud-key-gold" data-label="G"></span>
</span>
</div>
</div>
</div>
<a
class="btn-github"
rel="noopener noreferrer"
target="_blank"
aria-label="View source on GitHub"
href="https://github.com/LayoutitStudio/cssQuake"
>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="108 38 112 108" aria-hidden="true">
<path
transform="rotate(-45 164 92)"
d="M128 109c-15-9-9-19-9-19 3-7 2-11 2-11-1-7 3-2 3-2 4 5 2 11 2 11-3 10 5 15 9 16M115 115s4 2 5 0l14-14c3-2 6-3 8-3-8-11-15-24 2-41 5-5 10-7 16-7 1-2 3-7 12-11 0 0 5 3 7 16 4 2 8 5 12 9s7 8 9 12c14 3 17 7 17 7-4 8-9 11-11 11 0 6-2 11-7 16-16 16-30 10-41 2 0 3-1 7-5 11l-12 11c-1 1 1 5 1 5z"
/>
</svg>
</a>
<p class="quake-copyright-notice">
<span>Powered by PolyCSS v0.2.2</span>
<span>Quake assets © id Software LLC.</span>
</p>
<div id="quake-loading-overlay" role="status" aria-live="polite" aria-busy="true">
<div class="quake-loading-mark">
<span id="quake-loading-status" data-bm="title alt">Loading</span>
</div>
</div>
</main>
<script type="module" src="/src/main.ts"></script>
</body>
</html>