-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
48 lines (45 loc) · 1.63 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<style>
body {
background: linear-gradient(135deg,
white 0%,
white 49%,
black 49%,
black 51%,
white 51%,
white 100%);
background-repeat: repeat;
background-size: 20px 20px;
margin: 0px;
display: flex;
overflow: hidden;
}
canvas {
background-color: white;
}
@media only screen and (max-width: 1024px) {
#grabmouse {
display: none;
}
}
</style>
<!--link data-trunk rel="copy-dir" href="assets/branding/" /-->
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-keep-debug="true" data-no-demangle="false"
data-bin="app" data-type="main" />
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-keep-debug="true" data-no-demangle="false"
data-bin="worker" data-type="worker" />
</head>
<script type="module">
import init from './target/wasm.js'
init()
</script>
<!-- Current web restrictions require full screen mode to be initiated by the user so there's a button -->
<button id="grabmouse" style="overflow: visible;"
onclick="document.addEventListener('pointerlockchange', (e) => {document.getElementById('bevycanvas').focus();});bevycanvas.requestPointerLock();bevycanvas.requestFullscreen();"></button>
<canvas id="bevycanvas" tabindex="0" data-raw-handle="1" style="width: 100%; height: 100%;" alt="I am a window!"
cursor="auto" tabindex="1" oncontextmenu="return false;"></canvas>
</html>