-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
108 lines (98 loc) · 4.03 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
99
100
101
102
103
104
105
106
107
108
<!--
Copyright (c) 2022 Michael Federczuk
SPDX-License-Identifier: MPL-2.0 AND Apache-2.0
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Simple Physics/Collision Engine Demo</title>
<link rel="stylesheet" href="css/controls-guide.css" />
<link rel="stylesheet" href="css/main.css" />
<script type="application/javascript">
window.onerror = (message, _source, _lineno, _colno, error) => {
if(error instanceof Error) {
message = error.message;
}
if(typeof(message) === "string") {
alert(message);
}
};
</script>
<!-- generic utilities -->
<script type="application/javascript" src="js/utils/utils.js"></script>
<script type="application/javascript" src="js/utils/optional.js"></script>
<script type="application/javascript" src="js/utils/sequence.js"></script>
<script type="application/javascript" src="js/utils/observable.js"></script>
<script type="application/javascript" src="js/utils/observableValue.js"></script>
<!-- specialized utilities -->
<script type="application/javascript" src="js/utils/geometry2d/directions.js"></script>
<script type="application/javascript" src="js/utils/geometry2d/position.js"></script>
<script type="application/javascript" src="js/utils/geometry2d/box.js"></script>
<script type="application/javascript" src="js/utils/geometry2d/vector.js"></script>
<!-- input -->
<script type="application/javascript" src="js/input/inputAction.js"></script>
<script type="application/javascript" src="js/input/inputSource.js"></script>
<script type="application/javascript" src="js/input/inputManager.js"></script>
<script type="application/javascript" src="js/input/device/inputDevice.js"></script>
<script type="application/javascript" src="js/input/device/inputMap.js"></script>
<script type="application/javascript" src="js/input/device/deviceInputSource.js"></script>
<script type="application/javascript" src="js/input/device/keyboard/keyboard.js"></script>
<script type="application/javascript" src="js/input/device/keyboard/simpleKeyInputMap.js"></script>
<script type="application/javascript" src="js/input/device/keyboard/webKeyboard.js"></script>
<script type="application/javascript" src="js/input/dummyInputSource.js"></script>
<script type="application/javascript" src="js/input/randomInputSource.js"></script>
<!-- logic -->
<script type="application/javascript" src="js/forceCollection.js"></script>
<script type="application/javascript" src="js/entity.js"></script>
<script type="application/javascript" src="js/state.js"></script>
<!-- graphical -->
<script type="application/javascript" src="js/canvas.js"></script>
<script type="application/javascript" src="js/main.js"></script>
</head>
<body>
<div>
<table id="normal-controls-guide" class="controls-guide">
<caption class="controls-guide-text">Controls</caption>
<tbody>
<tr>
<td class="controls-guide-text">Left</td>
<td class="controls-guide-text">Right</td>
<td class="controls-guide-text">Jump</td>
</tr>
<tr>
<td><img src="assets/key_a.png" alt="[A]" /></td>
<td><img src="assets/key_d.png" alt="[D]" /></td>
<td><img src="assets/key_space.png" alt="[Spacebar]" /></td>
</tr>
</tbody>
</table>
<table id="noclip-controls-guide" class="controls-guide">
<caption class="controls-guide-text">Noclip Controls</caption>
<tbody>
<tr>
<td></td>
<td class="controls-guide-text">Up</td>
<td></td>
</tr>
<tr>
<td></td>
<td><img src="assets/key_w.png" alt="[W]" /></td>
<td></td>
</tr>
<tr>
<td class="controls-guide-text">Left</td>
<td class="controls-guide-text">Down</td>
<td class="controls-guide-text">Right</td>
</tr>
<tr>
<td><img src="assets/key_a.png" alt="[A]" /></td>
<td><img src="assets/key_s.png" alt="[S]" /></td>
<td><img src="assets/key_d.png" alt="[D]" /></td>
</tr>
</tbody>
</table>
</div>
<canvas id="main-canvas" style="z-index: -1;"></canvas>
</body>
</html>