-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (95 loc) · 2.98 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap"
rel="stylesheet"
/>
<style>
* {
font-family: 'Press Start 2P', cursive;
}
body{
margin: 0;
padding: 0;
background-color: white;
/*overflow-y: hidden; Hide vertical scrollbar */
/*overflow-x: hidden; Hide horizontal scrollbar */
}
/*
.example::-webkit-scrollbar {
display: none;
}
.example {
-ms-overflow-style: none;
scrollbar-width: none;
}*/
.controlBar{
/*position: absolute;*/
left: 0;
bottom: 0;
margin: 20px;
}
button{
width:70px;
height:50px;
}
.flash{
position:absolute;
background-color: black;
width: 100vw;
height: 100vh;
opacity: 0;
pointer-events: none;
}
.instructions{
position: absolute;
background-color: grey;
}
.joystick{
position: fixed;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif ;
color:rgb(128, 128, 128);
font-size: xx-large;
}
</style>
</head>
<body>
<div>
<div class="flash" id='flash'></div>
<canvas id="mainFrame"></canvas>
<div class="controlBar">
<h3>WASD for controls</h3>
<h3>Stand in front of house and press X to teleport</h3>
<button>UP</button>
<button>LEFT</button>
<button>RIGHT</button>
<button>DOWN</button>
<button>x</button>
</div>
</div>
<div class="controlBar">
<p style="text-align: center;">
X: <span id="x_coordinate"> </span>
Y: <span id="y_coordinate"> </span>
Speed: <span id="speed"> </span> %
Angle: <span id="angle"> </span>
</p>
<canvas id="joystick" name="game"></canvas>
</div>
<script>
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js" integrity="sha512-H6cPm97FAsgIKmlBA4s774vqoN24V5gSQL4yBTDOY2su2DeXZVhQPxFK4P6GPdnZqM9fg1G3cMv5wD7e6cFLZQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="./assets/data/collisions.js"></script>
<script src="./assets/data/teleport.js"></script>
<script src="./classes.js"></script>
<script src="./index.js"></script>
<script src="./joystick.js"></script>
</body>
</html>