-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
152 lines (138 loc) · 4.72 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="cache-control" content="no-cache" />
<meta
name="description"
content="Simple projectile motion simulator made with JavaScript"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Russo+One&family=Tektur:wght@400;600&display=swap"
rel="stylesheet"
/>
<meta http-equiv="expires" content="0" />
<title>Projectile simulator</title>
<link rel="stylesheet" href="style.css" />
</head>
<body onload="initCanvas()">
<a href="https://github.com/anic17/projectile-simulator"><h1 class="mainheader" title="View the source code on GitHub">Projectile motion simulator</h1></a>
<div class="container">
<span class="langdisp">
<span onclick="langIndex(0)" class="langswitch" id="enlang" title="English">en</span>
<span onclick="langIndex(1)" class="langswitch" id="calang" title="Català">ca</span>
<span onclick="langIndex(2)" class="langswitch" id="frlang" title="Français">fr</span>
<span onclick="langIndex(3)" class="langswitch" id="eslang" title="Español">es</span>
</span>
<div class="flexcont">
<div class="infodata">
<div class="fullwidth">
<div class="infodataline">
<span id="timetakenDisp">Time taken</span>:
<br>
<strong><span id="timetaken">0</span> s<br /></strong>
</div>
<div class="infodataline">
<span id="finalvelocityDisp">Final velocity</span>:
<br>
<strong><span id="finalvelocity">0</span> m/s<br /></div></strong>
<div class="infodataline">
<span id="finalpositionDisp">Final position</span>:
<br>
<strong><span id="finalposition">0</span> m<br /></div></strong>
<div class="infodataline">
<span id="maximumheightDisp">Maximum height</span>:
<br>
<strong><span id="maximumheight">0</span> m<br /></div></strong>
</div>
</div>
<div class="canvascont">
<canvas id="drawcanvas" width="800" height="600"></canvas>
</div>
<div class="langdata">
<div class="infodataline">
<div id="languageName"></div>
</div>
</div>
</div>
<div class="slidecontainer">
<input
type="range"
min="0"
max="90"
value="45"
class="angleSlider"
id="angleSlider"
/>
<div class="slidedispcont">
<span id="angleDisp">Angle</span>: <span id="angleOut">45</span>º
</div>
</div>
<div class="slidecontainer">
<input
type="range"
min="0"
max="300"
value="100"
class="velocitySlider"
id="velocitySlider"
/>
<div class="slidedispcont">
<span id="velocityDisp">Velocity</span>:
<span id="velocityOut">10</span> m/s
</div>
</div>
<div class="slidecontainer">
<input
type="range"
min="1"
max="300"
value="98"
class="gravitySlider"
id="gravitySlider"
/>
<div class="slidedispcont">
<span id="gravityDisp">Gravity</span>:
<span id="gravityOut">9.8</span> m/s²
</div>
</div>
<div class="slidecontainer">
<input
type="range"
min="0"
max="99"
value="60"
class="restitutionCoefSlider"
id="restitutionCoefSlider"
/>
<div class="slidedispcont">
<span id="restitutionCoefDisp">Coefficient of restitution</span>:
<span id="restitutionCoefOut">0.6</span>
</div>
</div>
<div class="slidecontainer">
<input
type="range"
min="0"
max="300"
value="0"
class="initialHeightSlider"
id="initialHeightSlider"
/>
<div class="slidedispcont">
<span id="initialHeightDisp">Initial height</span>:
<span id="initialHeightOut">10</span> m
</div>
</div>
</div>
<script src="script.js"></script>
<br />
<br />
<footer class="copyright">
Made by <a class="increase" href="https://github.com/anic17">anic17</a>
</footer>
</body>
</html>