-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
executable file
·83 lines (73 loc) · 2.56 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
<!DOCTYPE html>
<html>
<head>
<title> Fluids Simulation </title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="utils.js"></script>
<script src="grid.js"></script>
<script src="ui.js"></script>
<script src="simulator.js"></script>
<script src="fluids.js"></script>
<style>
body {
text-align: center;
}
</style>
</head>
<body>
<h1> Fluids Simulation </h1>
<p><canvas id="fluids_canvas" width="860" height="540" style="background: #000000">
Your browser does not support the canvas element.
</canvas></p>
<p>
<button onclick="resetSim();">Reset Simulation</button>
<button onclick="resetGUIParams();">Reset Parameters</button>
<button onclick="addGravityToSim();">+ Gravity</button>
</p>
<p>
<b>Left Mouse Action:</b>
Add Density:
<input type="radio" name="act_select" id="action_dens_drag" onchange="setParamsFromUI();">
Add Velocity:
<input type="radio" name="act_select" id="action_vel_drag" onchange="setParamsFromUI();">
</p>
<p>
Show Grid:
<input type="checkbox" id="show_grid" onchange="setParamsFromUI();" />
Show Velocities:
<input type="checkbox" id="show_vels" onchange="setParamsFromUI();" />
Show Stats:
<input type="checkbox" id="show_stats" onchange="setParamsFromUI();" />
</p>
<p>
Viscosity:
<input type="text" id="visc_val" onchange="setParamsFromUI();" />
Diffusion:
<input type="text" id="diff_val" onchange="setParamsFromUI();" />
Time Step:
<input type="text" id="time_step" onchange="setParamsFromUI();" />
</p>
<p>
Grid Cols (X):
<input type="text" id="grid_cols" onchange="setParamsFromUI();" />
Grid Rows (Y):
<input type="text" id="grid_rows" onchange="setParamsFromUI();" />
Num Solver Iterations:
<input type="text" id="solver_iters" onchange="setParamsFromUI();" />
</p>
<p>
The simulation source code can be viewed <a href="fluids.js">here</a>.
</p>
</body>
</html>