-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
122 lines (117 loc) · 2.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
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
Balls Simulation
</title>
<style>
canvas{
position: absolute;
left:0pt;
top:0pt
}
div.panel{
position: absolute;
left:0pt;
bottom: 0pt;
width:100%;
background: #FFFEAF;
border-top: 8pt solid black;
padding-top: 10pt;
padding-bottom: 10pt;
font-size: 12pt;
white-space: nowrap;
overflow-x: auto;
}
.slider{
width:200pt;
}
</style>
<script src="main.js"></script>
<script src="RenderScene.js"></script>
</head>
<body>
<canvas id="canvas"></canvas>
<image id="ballImage" src="ball.png" style="display:none"></image>
<image id="ballImage1" src="ball1.png" style="display:none"></image>
<div class="panel" id="panel">
<center>
<table>
<tbody>
<tr>
<td>
Radius:
</td>
<td>
1
</td>
<td>
<input id="Slider1" class="slider" type="range" min=1 max=100 step=1 value=39>
</td>
<td>
100
</td>
</tr>
<tr>
<td>
Wall elasticity:
</td>
<td>
0
</td>
<td>
<input id="Slider2" class="slider" type="range" min=0 max=1 step=0.00001 value=0.95>
</td>
<td>
1
</td>
</tr>
<tr>
<td>
Air resistance:
</td>
<td>
0
</td>
<td>
<input id="Slider4" class="slider" type="range" min=0 max=0.01 step=0.00001 value=0>
</td>
<td>
</td>
</tr>
<tr>
<td>
Gravity:
</td>
<td>
0
</td>
<td>
<input id="Slider3" class="slider" type="range" min=0 max=10 step=0.00001 value=3>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="4">
<input type="button" id="stepperUp" value="+">
<input type="button" id="stepperDown" value="-">
<label><input id="segment1" name="segmented" type="radio" checked>Free</label>
<label><input id="segment2" name="segmented" type="radio">Fixed</label>
<label><input id="segment3" name="segmented" type="radio">Connected</label>
<label><input id="segment4" name="segmented" type="radio">Spring</label>
<br>
<label><input id="switch1" type="checkbox">Click/Drag to add balls</label>
<input type="button" id="btnRestart" value="Remove All">
</td>
</tr>
</tbody>
</table>
</center>
</div>
<div style="position:absolute; right:2px; bottom: 2px; color:gray; font-size:9pt;">
<a href="https://github.com/ricktu288/balls-simulation" target="_blank" style="color:gray">GitHub Repo</a>
</div>
</body>
</html>