-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimulator.html
118 lines (116 loc) · 4.07 KB
/
simulator.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
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UT-8" />
<title>Flight Simulator</title>
<script src="http://interactivecomputergraphics.com/8E/Code%20update/Common/initShadersES6.js"></script>
<script src="http://interactivecomputergraphics.com/8E/Code%20update/Common/MVES6.js"></script>
<script src='http://git.io/perlin.js'></script>
<script type="text/javascript" src="terrain.js"></script>
<script type="text/javascript" src="flight.js"></script>
<script type="text/javascript" src="map.js"></script>
<script type="text/javascript" src="utils.js"></script>
</head>
<body>
<div style="display: flex; justify-content: space-around;">
<div style="display: flex; flex-direction: column; gap: 2rem;">
<div>
<h3>Press the following keys to control bounds</h3>
<table>
<tr>
<th></th>
<th>Decrease</th>
<th>Increase</th>
</tr>
<tr>
<td>Left</td>
<td>Shift+1</td>
<td>1</td>
</tr>
<tr>
<td>Right</td>
<td>Shift+2</td>
<td>2</td>
</tr>
<tr>
<td>Top</td>
<td>Shift+3</td>
<td>3</td>
</tr>
<tr>
<td>Bottom</td>
<td>Shift+4</td>
<td>4</td>
</tr>
<tr>
<td>Near</td>
<td>Shift+5</td>
<td>5</td>
</tr>
<tr>
<td>Far</td>
<td>Shift+6</td>
<td>6</td>
</tr>
</table>
</div>
<div>
<h3>Viewing Parameters</h3>
<table>
<tr>
<th>Bounds</th>
<th>Value</th>
</tr>
<tr>
<td>Left</td>
<td id="left"></td>
</tr>
<tr>
<td>Right</td>
<td id="right"></td>
</tr>
<tr>
<td>Top</td>
<td id="top"></td>
</tr>
<tr>
<td>Bottom</td>
<td id="bottom"></td>
</tr>
<tr>
<td>Near</td>
<td id="near"></td>
</tr>
<tr>
<td>Far</td>
<td id="far"></td>
</tr>
</table>
</div>
</div>
<div style="display: flex; flex-direction: column;">
<canvas
id="gl-canvas"
width="512"
height="512"
style="border: 1px solid #000000;"
>
Oops ... your browser doesn't support the HTML5 canvas element
</canvas>
<div>View: <span id="view"></span></div>
<div>Shading: <span id="shading"></span></div>
</div>
<div>
<p>
W-S to pitch
</p>
<p>A-D to Yaw</p>
<p>Q-E to Roll</p>
<p>Up-Down Arrow Key to change speed</p>
<p>C to Switch Shading</p>
<p>V to Switch Viewing Model</p>
<p>Escape key to Quit</p>
</div>
</div>
</body>
</html>