-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
127 lines (105 loc) · 3.86 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Particle-based Viscoelastic Fluid Simulation</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<canvas id="simCanvas"></canvas>
<div id="overlay">
<div id="controls">
<p id="fps">FPS: 0</p>
<p>
<label for="numParticles"># Particles:</label>
<select name="numParticles" id="numParticles">
<option value="1000">1K</option>
<option value="2000" selected="true">2K</option>
<option value="3000">3K</option>
<option value="4000">4K</option>
</select>
</p>
<p>
<label for="restDensity">Rest Density:</label>
<input type="range" name="restDensity" id="restDensity" min="0.1" max="8.0" step="0.1" value="4.0">
</p>
<p>
<label for="stiffness">Stiffness:</label>
<input type="range" name="stiffness" id="stiffness" min="0.1" max="2.0" step="0.1" value="0.5">
</p>
<p>
<label for="nearStiffness">Near Stiffness:</label>
<input type="range" name="nearStiffness" id="nearStiffness" min="0.1" max="2.0" step="0.1" value="0.5">
</p>
<p>
<label for="springStiffness">Spring Stiffness:</label>
<input type="range" name="springStiffness" id="springStiffness" min="0" max=".5" step="0.01" value="0.0">
</p>
<p>
<label for="plasticity">Plasticity</label>
<input type="range" name="plasticity" id="plasticity" min="0.1" max="1.0" step="0.01" value="0.5">
</p>
<p>
<label for="yieldRatio">Yield Ratio:</label>
<input type="range" name="yieldRatio" id="yieldRatio" min="0.1" max="1.0" step="0.01" value="0.25">
</p>
<p>
<label for="minDistRatio">Min Spring Dist Ratio:</label>
<input type="range" name="minDistRatio" id="minDistRatio" min="0.025" max="1.0" step="0.01" value=".25">
</p>
<p>
<label for="linViscosity">Linear Viscosity:</label>
<input type="range" name="linViscosity" id="linViscosity" min="0.0" max="0.5" step="0.01" value="0.0">
</p>
<p>
<label for="quadViscosity">Quadratic Viscosity:</label>
<input type="range" name="quadViscosity" id="quadViscosity" min="0.0" max="0.5" step="0.01" value="0.1">
<p>
<label for="kernelRadius">Kernel Radius:</label>
<input type="range" name="kernelRadius" id="kernelRadius" min="5.0" max="64.0" step="1.0" value="40.0">
</p>
<p>
<label for="pointSize">Point Size:</label>
<input type="range" name="pointSize" id="pointSize" min="1" max="20" step="1" value="5">
</p>
<p>
<label for="gravX">Gravity X:</label>
<input type="range" name="gravX" id="gravX" min="-0.5" max="0.5" step="0.01" value="0">
</p>
<p>
<label for="gravY">Gravity Y:</label>
<input type="range" name="gravY" id="gravY" min="-0.5" max="0.5" step="0.01" value="0.5">
</p>
<p>
<label for="dt">Time Step:</label>
<input type="range" name="dt" id="dt" min="0.1" max="1.0" step="0.1" value="1.0">
</p>
<p>
<button id="startButton">Start</button>
<button id="pauseButton">Pause</button>
<button id="stepButton">Step</button>
<button id="resetButton">Reset</button>
</p>
<p>
<small>
KB: (A)ttract, (R)epel, (E)mit, (D)rain
</small>
<br>
<small>
You can drag mouse as well as window!
</small>
</p>
<p>
<a href="sim_3.html">Prev</a>
</p>
</div>
<p>
<button id="collapseButton">Collapse</button>
</p>
</div>
<script src="fpsMonitor.js"></script>
<script src="sim_5.js"></script>
<script src="run_0.js"></script>
</body>
</html>