-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.html
More file actions
42 lines (40 loc) · 986 Bytes
/
shell.html
File metadata and controls
42 lines (40 loc) · 986 Bytes
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
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>Raylib WebAssembly</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
}
canvas {
aspect-ratio: 1 / 1;
width: min(90vmin, 600px);
height: auto;
display: block;
background-color: black;
border: none;
}
</style>
</head>
<body>
<canvas id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
<script type="text/javascript">
const canvas = document.getElementById('canvas');
canvas.addEventListener("webglcontextlost", (e) => {
alert('WebGL context lost. Reload the page.');
e.preventDefault();
});
var Module = {
canvas: canvas,
};
</script>
{{{ SCRIPT }}}
</body>
</html>