-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell_minimal.html
More file actions
51 lines (48 loc) · 1.21 KB
/
shell_minimal.html
File metadata and controls
51 lines (48 loc) · 1.21 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>My Game</title>
<style>
html, body {
margin: 0;
padding: 0;
background: #222;
height: 100%;
overflow: hidden;
}
canvas {
display: block;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
aspect-ratio: 16 / 9; /* ここはゲームに合わせて調整してね! */
max-width: 100svw;
max-height: 100svh;
}
@media (min-aspect-ratio: 16/9) {
canvas {
height: 100svh;
width: auto;
}
}
@media (max-aspect-ratio: 16/9) {
canvas {
width: 100svw;
height: auto;
}
}
</style>
</head>
<body>
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<script>
var Module = {
canvas: document.getElementById('canvas')
};
</script>
{{{ SCRIPT }}}
</body>
</html>