-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevents.js
41 lines (34 loc) · 840 Bytes
/
events.js
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
// Event handler code
// Set up and handle slider event listeners
slidergravity.oninput = function() {
G = parseFloat(slidergravity.value);
draw();
}
sliderdamping.oninput = function() {
D = parseFloat(sliderdamping.value);
draw();
}
sliderangleone.oninput = function() {
p1theta = parseFloat(sliderangleone.value);
draw();
}
sliderangletwo.oninput = function() {
p2theta = parseFloat(sliderangletwo.value);
draw();
}
sliderlengthone.oninput = function() {
p1r = parseFloat(sliderlengthone.value);
draw();
}
sliderlengthtwo.oninput = function() {
p2r = parseFloat(sliderlengthtwo.value);
draw();
}
slidermassone.oninput = function() {
p1m = parseFloat(slidermassone.value);
draw();
}
slidermasstwo.oninput = function() {
p2m = parseFloat(slidermasstwo.value);
draw();
}