forked from kotsoft/particle_based_viscoelastic_fluid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sim_3.html
100 lines (84 loc) · 2.8 KB
/
sim_3.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>PVFS 2.2 - Iterate by Bucket Instead of Particle</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="5000">5K</option>
<option value="10000">10K</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="kernelRadius">Kernel Radius:</label>
<input type="range" name="kernelRadius" id="kernelRadius" min="5.0" max="64.0" step="1.0" value="32.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.25">
</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_2.html">Prev</a>
|
<a href="index.html">Next</a>
</p>
</div>
<p>
<button id="collapseButton">Collapse</button>
</p>
</div>
<script src="fpsMonitor.js"></script>
<script src="sim_3.js"></script>
<script src="run_0.js"></script>
</body>
</html>