-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
66 lines (58 loc) · 1.77 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Velocity Selector</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div style="height: 100px">
<p id="question"> Prompt goes here </p>
</div>
<div id="container">
<canvas id="animationCanvas">
</canvas>
<div id="animation">
</div>
</div>
<div style="float: right; height: 300px; width: 300px">
<div class="container_slider">
Electric field <span id='efo'></span>
<br>
<input type="range" min="-200" max="200" value="0" class="slider" id="electric_field_slider">
<input type="checkbox" id="electric_field_box" onclick="electricFieldLines()">
</div>
<div class="container_slider">
Magnetic field <span id='mfo'></span>
<br>
<input type="range" min="-50" max="50" value="0" class="slider" id="magnetic_field_slider">
<input type="checkbox" id="magnetic_field_box" onclick="magneticFieldLines()">
</div>
<div class="container_slider">
Charge <span id='co'></span>
<br>
<input type="range" min="-1" max="1" value="0" step="2" class="slider" id="charge_slider">
</div>
<div class="container_slider">
Velocity <span id='vo'></span>
<br>
<input type="range" min="1" max="100" value="10" class="slider" id="velocity_slider">
</div>
<br>
Show trajectory
<input type="checkbox" id="show_trajectory" onclick="generateTrajectory()">
<br><br>
<button onclick="run()"> Run Simulation </button>
<br><br>
<button onclick="submit()" id="submit"> Submit </button>
<button onclick="document.location.reload(true)" id="next"> Next </button>
<br><br>
<button onclick="toggleGame()" id="toggle_game"> Free Simulation Mode </button>
</div>
<div class="results">
<h4 style='text-align: center;' id='score'> Score: 0 </h4>
<h3 style="text-align: center;" id="result"> </h3>
</div>
<script src="main.js"></script>
</body>
</html>