-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
173 lines (156 loc) · 7.08 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<html>
<head>
<title>WebSPH</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="./js/web-sph.js"></script>
<style>
* {
box-sizing: border-box;
}
body {
font-family: "Trebuchet MS", Helvetica, sans-serif;
background-color: #cee7ff;
}
table, th, td {
/*border: 1px solid black; /* debug */
}
table {
border-collapse: collapse;
border-spacing: 0;
}
#websph-main-table {
margin: auto;
}
.button {
background-color: darkblue;
border: none;
color: white;
padding: 2px 0;
width: 120px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}
.button:hover {
background-color: #4f3dff;
}
</style>
</head>
<body onload="WebSPH.main()">
<table id="websph-main-table">
<tr>
<td>
<div style="font-size: 22pt; text-align: center">WebSPH - 1D shallow water equations</div>
</td>
</tr>
<tr>
<td>
<canvas id="web-gl-canvas" style="border:1px solid #000000;" width="1000" height="300"></canvas>
</td>
</tr>
<tr>
<td>
<!-- settings -->
<table>
<tr>
<td> Version: </td> <td> [v0.3.9] </td>
</tr>
<tr>
<td> Avg FPS:</td> <td> <div id="websph-fps">?</div> </td>
</tr>
<tr>
<td> Total time:</td> <td> <div id="websph-total-time">0</div> </td>
</tr>
<tr>
<td> Animation: </td>
<td>
<button class="button" id="websph-btn-animation" type="button">Start</button>
run until:
<input type="text" id="websph-txt-max-time" name="max-time" style="display: inline; width: 50px;">
<div id="websph-div-max-time" style="display: inline;">(not used)</div>
</td>
</tr>
<tr id="websph-tr-onestep">
<td> Simulation step: </td>
<td>
<button class="button" id="websph-btn-onestep" type="button">Do one step</button>
</td>
</tr>
<tr id="websph-tr-reset">
<td> Reset: </td>
<td>
<button class="button" id="websph-btn-reset" type="button">Reset</button> Particles:
<input id="websph-sld-num-part" style="border: black; display: inline" type="range" min="10" max="2000" step ="1"/>
<div id="websph-div-num-part" style="display: inline"> XX </div>
</td>
</tr>
<tr>
<td> Time stepping: </td>
<td>
<input id="websph-opt-dt-fixed" type="radio" name="timestepping">
<div style="display: inline-block; width: 125px;">Fixed: </div>
<div id="websph-div-dt-fixed" style="display: inline"> </div>
<input id="websph-sld-dt" style="border: black; display: inline" type="range" min="0.0001" max="0.01" step ="0.0001"/>
<br>
<input id="websph-opt-dt-dyn-stable" type="radio" name="timestepping">
<div style="display: inline-block; width: 125px;">Dynamic, stable: </div>
<div id="websph-div-dt-dyn-stable" style="display: inline"> </div>
<br>
<input id="websph-opt-dt-dyn-fast" type="radio" name="timestepping">
<div style="display: inline-block; width: 125px;">Dynamic, fast: </div>
<div id="websph-div-dt-dyn-fast" style="display: inline"> </div>
<br>
<input id="websph-chk-limit-max-dt" type="checkbox" checked="checked">
<div style="display: inline-block; width: 125px;">Limit to 0.01 </div>
</td>
</tr>
<tr>
<td> Integrator: </td>
<td>
<input id="websph-opt-euler" type="radio" name="integrator"> Euler
<input id="websph-opt-heun" type="radio" name="integrator"> Heun original
<input id="websph-opt-heun-naive" type="radio" name="integrator"> Heun naive
<input id="websph-opt-heun-reduced" type="radio" name="integrator"> Heun reduced
</td>
</tr>
<tr>
<td> Boundary: </td>
<td>
<input id="websph-opt-cyclic" type="radio" name="boundary"> Cyclic
<input id="websph-opt-solid" type="radio" name="boundary"> Solid
</td>
</tr>
<tr>
<td> Simulation <i>h</i>: </td>
<td style="white-space: nowrap;">
<input id="websph-sld-smoothing" style="border: black" type="range" min="0.001" max="0.1" step ="0.001"/>
<div id="websph-div-smoothing" style="display: inline"> </div>
</td>
</tr>
<tr>
<td> Visualization <i>h</i>: </td>
<td style="white-space: nowrap;">
<input id="websph-sld-smoothing-visu" style="border: black" type="range" min="0.001" max="0.1" step ="0.001"/>
<div id="websph-div-smoothing-visu" style="display: inline"> </div>
</td>
</tr>
<tr>
<td> Particle size: </td>
<td style="white-space: nowrap;">
<input id="websph-sld-point-size" style="border: black" type="range" min="0" max="10" step ="1"/>
<div id="websph-div-point-size" style="display: inline"> </div>
</td>
</tr>
<tr style="display: none">
<td> Number of particles: </td>
<td>
slider + respawn button here
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>