-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
254 lines (245 loc) · 11.7 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Braitenberg Vehicles</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="libraries/p5.min.js"></script>
</head>
<body>
<div id="fullscreen-message">
<h1 style="margin-top: 20%">To use this app, you must enter fullscreen mode. This is different from making your browser window fullscreen.</h1>
<h1>You can enter fullscreen mode by pressing the button below.</h1>
<button id="fullscreen-button">Fullscreen</button>
</div>
<div id="about-modal" class="modal">
<div class="modal-content">
<span class="modal-close">x</span>
<h1>About</h1>
<hr>
<p>
This website was created by Harvey Mudd College students under the guidance of <a target="_blank" href="https://www.cs.hmc.edu/~bang/">Professor Lucas Bang</a>. The simulations are based on the book <a href="https://archive.org/details/vehiclesexperime00brai" target="_blank"><i>Vehicles: Experiments in Synthetic Psychology</i></a> by Valentino Braitenberg.
</p>
<p>
To request a feature, fill out <a href="https://forms.gle/kEHMDuVuQ9kuQo6YA" target="_blank">this</a> form. To report a bug, fill out <a href="https://forms.gle/zEg78qYWrdCviKSF7" target="_blank">this</a> form.
</p>
<p>
This website is currently actively maintained by <a href="https://v-tao.github.io/">Devon Tao</a>. If you have any questions, feel free to contact them at <a href="mailto:vtao@g.hmc.edu">vtao@g.hmc.edu</a>.
</p>
</div>
</div>
<!-- <div>
<select style="display: none" id="vehicle-4a-select">
<option value="sinusoidal">Sinusoidal</option>
<option value="quadratic">Quadratic</option>
<option value="sqrt">Square Root</option>
<option value="log">Log</option>
<option value="semicircle">Semicircle</option>
<option value="flipped semicircle">Flipped Semicircle</option>
</select>
<select style="display: none" id="vehicle-4b-select">
<option value="repeating linear">Repeating Linear</option>
<option value="ascending linear">Ascending Linear</option>
<option value="repeating steps">Repeating Steps</option>
<option value="ascending steps">Ascending Steps</option>
<option value="hyperbola">Hyperbola</option>
</select>
</div> -->
<div id="about-vehicles-modal" class="modal">
<div class="modal-content">
<span class="modal-close">x</span>
<div id="about-vehicles-menu">
<h1>About Vehicles</h1>
<hr>
<ul>
<li><a class="about-vehicles-menu-item" name=0 href="#">Vehicle 1</a></li>
<li><a class="about-vehicles-menu-item" name=1 href="#">Vehicle 2a</a></li>
<li><a class="about-vehicles-menu-item" name=2 href="#">Vehicle 2b</a></li>
<li><a class="about-vehicles-menu-item" name=3 href="#">Vehicle 2c</a></li>
<li><a class="about-vehicles-menu-item" name=4 href="#">Vehicle 3a</a></li>
<li><a class="about-vehicles-menu-item" name=5 href="#">Vehicle 3b</a></li>
<li><a class="about-vehicles-menu-item" name=6 href="#">Vehicle 4a</a>
<ul>
<li><a class="about-vehicles-menu-item" name="7" href="#">Sinusoidal</a></li>
<li><a class="about-vehicles-menu-item" name="8" href="#">Quadratic</a></li>
<li><a class="about-vehicles-menu-item" name="9" href="#">Square Root</a></li>
<li><a class="about-vehicles-menu-item" name="10" href="#">Log</a></li>
<li><a class="about-vehicles-menu-item" name="11" href="#">Semicircle</a></li>
<li><a class="about-vehicles-menu-item" name="12" href="#">Flipped Semicircle</a></li>
</ul>
</li>
<li><a class="about-vehicles-menu-item" name="13" href="#">Vehicle 4b</a>
<ul>
<li><a class="about-vehicles-menu-item" name="14" href="#">Repeating Linear</a></li>
<li><a class="about-vehicles-menu-item" name="15" href="#">Ascending Linear</a></li>
<li><a class="about-vehicles-menu-item" name="16" href="#">Repeating Steps</a></li>
<li><a class="about-vehicles-menu-item" name="17" href="#">Ascending Steps</a></li>
<li><a class="about-vehicles-menu-item" name="18" href="#">Hyperbola</a></li>
</ul>
</li>
</ul>
</div>
<div id="about-vehicles-content">
<h1 id="vehicle-header"></h1>
<hr>
<p id="vehicle-text"></p>
<div style="display: flex; justify-content: center; margin-bottom: 15px;">
<img id="vehicle-image" src="#">
</div>
<div class="modal-footer">
<a id="previous-vehicle" href="#">Previous</a>
<a id="about-vehicles-menu-link" href="#">Menu</a>
<a id="next-vehicle" href="#">Next</a>
</div>
</div>
</div>
</div>
<div id="tutorial-modal" class="modal">
<div class="modal-content">
<span class="modal-close">x</span>
<div id="tutorial-menu">
<h1>Tutorials</h1>
<hr>
<ul>
<li><a class="tutorial-menu-item" name=0 href="#">Adding Sources</a></li>
<li><a class="tutorial-menu-item" name=1 href="#">Removing Sources</a></li>
<li><a class="tutorial-menu-item" name=2 href="#">Adding Vehicles</a></li>
<li><a class="tutorial-menu-item" name=3 href="#">Removing Vehicles</a></li>
<li><a class="tutorial-menu-item" name=4 href="#">Controls</a></li>
</ul>
<p><i>Note: Draw mode is currently in beta. Tutorials will be added when development is finished.</i></p>
<p></p>
</div>
<div id="tutorial-content">
<h1 id="tutorial-header"></h1>
<hr>
<div style="display: flex; justify-content: center; margin-bottom: 15px;">
<video id="tutorial-video" src="#" width="80%" controls autoplay >
Your browser does not support the video tag.
</video>
</div>
<div class="modal-footer">
<a id="previous-tutorial" href="#">Previous</a>
<a id="tutorial-menu-link" href="#">Menu</a>
<a id="next-tutorial" href="#">Next</a>
</div>
</div>
</div>
</div>
<div class="header">
<h1>Braitenberg Vehicles</h1>
<button id="about-button">About</button>
<button id="about-vehicles-button">About Vehicles</button>
<button id="tutorial-button">Tutorials</button>
</div>
<div class="container" style="margin-top: 0.5rem">
<div id="canvas">
</div>
<div id="menu">
<div class="menu-item" id="modes">
<h3>Modes</h3>
<button id="sandbox-mode-button" class="clicked">Sandbox</button>
<button id="draw-mode-button">Draw</button>
</div>
<div class="menu-item" id="controls">
<h3>Controls</h3>
<button id="start-stop-button">Start</button>
<button class="danger-button" id="reset-button">Reset</button>
<div>
<input type="range" id="zoom-slider" value="400" min="50" max="400" step="1">
<label id="zoom-label" for="zoom-slider">Zoom: 400</label>
</div>
<div>
<p>Vehicle Speed:</p>
<input class="speed-button" id="speed-button-0.25" name="speed" type="radio" value="0.25">
<label for="speed-button-0.25">0.25x</label>
<input class="speed-button" id="speed-button-0.5" name="speed" type="radio" value="0.5">
<label for="speed-button-0.5">0.5x</label>
<input class="speed-button" id="speed-button-1" name="speed" type="radio" value="1" checked>
<label for="speed-button-1">1x</label>
<input class="speed-button" id="speed-button-2" name="speed" type="radio" value="2">
<label for="speed-button-2">2x</label>
<input class="speed-button" id="speed-button-4" name="speed" type="radio" value="4">
<label for="speed-button-2">4x</label>
</div>
</div>
<div class="menu-item" id="sources">
<h3>Sources</h3>
<label for="source-intensity-input">Intensity:</label>
<input id="source-intensity-input" type="number" value="50" min="0" max="1000">
<div style="margin-top: 10px">
<button id="add-source-button">Add</button>
<button class="danger-button" id="remove-source-button">Remove</button>
<button class="danger-button" id="remove-all-sources-button">Remove All</button>
</div>
</div>
<div class="menu-item" id="vehicles">
<h3>Vehicles</h3>
<select id="vehicle-select">
<option value="1">Vehicle 1</option>
<option value="2a">Vehicle 2a: Coward</option>
<option value="2b">Vehicle 2b: Aggressive</option>
<option value="2c">Vehicle 2c: Luxurious Vehicle 1</option>
<option value="3a">Vehicle 3a: Love</option>
<option value="3b">Vehicle 3b: Explorer</option>
<option value="4a">Vehicle 4a: Instincts</option>
<option value="4b">Vehicle 4b: Will</option>
</select>
<div style="margin-top: 10px">
<button id="add-vehicle-button">Add</button>
<button class="danger-button" id="remove-vehicle-button">Remove</button>
<button class="danger-button" id="remove-all-vehicles-button">Remove All</button>
</div>
<div style="display: none" id="starting-velocity">
<input type="range" id="velocity-slider" value="250" min="0" max="500" step="1">
<label id="velocity-label" for="velocity-slider">Starting Velocity: 250</label>
</div>
<div>
<select style="display: none" id="vehicle-4a-select">
<option value="sinusoidal">Sinusoidal</option>
<option value="quadratic">Quadratic</option>
<option value="sqrt">Square Root</option>
<option value="log">Log</option>
<option value="semicircle">Semicircle</option>
<option value="flipped semicircle">Flipped Semicircle</option>
</select>
<select style="display: none" id="vehicle-4b-select">
<option value="repeating linear">Repeating Linear</option>
<option value="ascending linear">Ascending Linear</option>
<option value="repeating steps">Repeating Steps</option>
<option value="ascending steps">Ascending Steps</option>
<option value="hyperbola">Hyperbola</option>
</select>
</div>
<p id="total-vehicles">Total Vehicles: 0</p>
<label for="vehicle-tracker-toggle">Show Vehicle Tracker</label>
<input type="checkbox" id="vehicle-tracker-toggle" name="vehicle-tracker-toggle">
<div id="vehicle-tracker">
</div>
</div>
</div>
</div>
<input type="color" id="vehicle-color-picker">
<script src="js/config.js"></script>
<script src="js/enums.js"></script>
<script src="js/modules/Vector.js"></script>
<script src="js/util.js"></script>
<script src="js/modules/Renderer.js"></script>
<script src="js/modules/Universe.js"></script>
<script src="js/modules/Vehicle.js"></script>
<script src="js/modules/Gyro.js"></script>
<script src="js/modules/Source.js"></script>
<script src="js/modules/Components/Component.js"></script>
<script src="js/modules/Components/Sensor.js"></script>
<script src="js/modules/Components/MotorController.js"></script>
<script src="js/modules/Components/Motor.js"></script>
<script src="js/modules/Components/Inhibitor.js"></script>
<script src="js/Vehicles/Vehicle1.js"></script>
<script src="js/Vehicles/Vehicle2.js"></script>
<script src="js/Vehicles/Vehicle3.js"></script>
<script src="js/Vehicles/Vehicle4.js"></script>
<script src="js/events.js"></script>
<script src="js/main.js"></script>
</body>
</html>