-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
41 lines (40 loc) · 979 Bytes
/
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
height: 100vh;
margin: 0;
display: flex;
justify-content: center;
background-image: url("assets/background-art.jpeg");
background-size: cover;
background-position: center;
}
canvas {
max-width: 100%;
object-fit: contain;
}
</style>
</head>
<body>
<canvas id="game"></canvas>
<script src="p5.min.js"></script>
<script>
// prevent itch.io scrolling
window.addEventListener("keydown", (e) => {
if (
["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", " "].includes(
e.key
)
) {
e.preventDefault();
}
});
</script>
<script type="module" src="main.js"></script>
</body>
</html>