-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (74 loc) · 2.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Self-Driving Car Simulation</title>
<link rel="shortcut icon" href="./styles/favicon.png" type="image/x-icon" />
<link rel="stylesheet" href="./styles/style.css" />
</head>
<body>
<canvas id="carCanvas"></canvas>
<div id="verticalButtons">
<button
onclick="save()"
title="This will update the car's brain. Are you sure you want to do that?"
>
✅
</button>
<button
onclick="discard()"
title="This will remove the car's brain & you'll need to train the system again. Are you sure you want to do that?"
>
🗑️
</button>
<div class="dropdown">
🧬
<select
name="mutationAmount"
id="mutationAmount"
onchange="localStorage.setItem('mutationAmount', this.value)"
title="Mutation amount"
>
<option value="0.01">0.01</option>
<option value="0.02">0.02</option>
<option value="0.05" selected>0.05</option>
<option value="0.075">0.075</option>
<option value="0.1">0.1</option>
<option value="0.15">0.15</option>
<option value="0.2">0.2</option>
</select>
</div>
<div class="dropdown">
🚙
<select
name="carCount"
id="carCount"
onchange="localStorage.setItem('carCount', this.value)"
title="Number of cars"
>
<option value="1">1</option>
<option value="10">10</option>
<option value="100" selected>100</option>
<option value="300">300</option>
</select>
</div>
<button
id="refreshButton"
onclick="location.reload()"
title="Reload Simulation"
>
🔄
</button>
</div>
<canvas id="networkCanvas"></canvas>
<script src="./scripts/visualizer.js"></script>
<script src="./scripts/network.js"></script>
<script src="./scripts/sensor.js"></script>
<script src="./scripts/utils.js"></script>
<script src="./scripts/road.js"></script>
<script src="./scripts/controls.js"></script>
<script src="./scripts/car.js"></script>
<script src="./scripts/main.js"></script>
</body>
</html>