-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
60 lines (58 loc) · 1.6 KB
/
index.html
File metadata and controls
60 lines (58 loc) · 1.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Key Finder</title>
<style>
html,
body {
width: 100%;
height: 100%;
background-color: black;
}
.container {
display: grid;
place-items: center;
height: 100%;
}
canvas {
width: 800px;
height: 500px;
overflow: hidden;
position: absolute;
background: black;
z-index: 0;
}
canvas:focus {
outline: none;
}
</style>
<script>
window.onload = function () {
const canv = document.getElementById("glcanvas");
if (!canv) {
console.error("Canvas not found!");
return;
}
document.addEventListener("click", () => {
canv.focus();
});
canv.addEventListener('click', () => {
canv.focus();
})
}
</script>
</head>
<body>
<div class="container">
<canvas id="glcanvas" tabindex='-1'>
<!-- Minified and statically hosted version of https://github.com/not-fl3/macroquad/blob/master/js/mq_js_bundle.js -->
<script src="https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js"></script>
<script>
load("./target/wasm32-unknown-unknown/debug/keyfinder.wasm");
</script>
</canvas>
</div>
</body>
</html>