-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.html
More file actions
47 lines (47 loc) · 1.64 KB
/
Copy pathshell.html
File metadata and controls
47 lines (47 loc) · 1.64 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>wasm-web-kit game</title>
<style>
:root { color-scheme: dark; }
html, body {
margin: 0; height: 100%;
background: #0b0b0f; color: #e6e6e6;
font-family: ui-monospace, Menlo, monospace;
display: flex; align-items: center; justify-content: center;
}
#stage { display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* The canvas width/height and this aspect-ratio must match WASMWEB.logical*. */
#game {
width: min(96vw, calc(96vh * 1184 / 666));
aspect-ratio: 1184 / 666;
background: #000; border-radius: 6px;
box-shadow: 0 10px 40px rgba(0,0,0,.6);
object-fit: contain;
}
#game:fullscreen { width: 100vw; height: 100vh; border-radius: 0; background: #0b0b0f; }
#game:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; background: #0b0b0f; }
#hint { font-size: 12px; opacity: .55; letter-spacing: .04em; }
</style>
</head>
<body>
<div id="stage">
<canvas id="game" width="1184" height="666" tabindex="0"></canvas>
<div id="hint">wasm-web-kit · no Emscripten</div>
</div>
<script>
// Configure the runtime for your game. Keep the canvas width/height and the
// CSS aspect-ratio above in sync with these logical dimensions.
window.WASMWEB = {
logicalWidth: 1184,
logicalHeight: 666,
wasmUrl: 'game.wasm',
assetRoot: '../assets',
title: 'wasm-web-kit game',
};
</script>
<script src="runtime.js"></script>
</body>
</html>