-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
94 lines (90 loc) · 2.81 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="favicon.svg" sizes="any" type="image/svg+xml">
<title>webgl2 fluid simulation</title>
<style>
body {
position: fixed;
inset: 0;
margin: 0;
}
#fluidsim_canvas {
width: 100%;
height: 100%;
touch-action: none;
}
#param_form {
position: absolute;
display: flex;
flex-direction: column;
align-items: flex-end;
font-size: small;
bottom: 0;
right: 0;
padding: 1em;
background-color: rgba(0, 0, 0, 0.5);
color: white;
}
#param_form > div {
display: flex;
align-items: center;
gap: 0.5em;
}
#display_radio {
border: 0;
display: flex;
gap: 1em;
}
a {
color: white;
margin: 0.5em auto;
font-size: medium;
}
</style>
</head>
<body>
<form id="param_form">
<a href="https://github.com/loicmagne/webgl2_fluidsim/" target="_blank">github</a>
<div>
<label for="pressure">viscosity</label>
<input type="range" min="0.0" max="1.0" step="0.001" value="0.25" class="slider" id="viscosity">
</div>
<div>
<label for="pressure">pressure</label>
<input type="range" min="0.0" max="1.0" step="0.001" value="0.25" class="slider" id="pressure">
</div>
<div>
<label for="radius">radius</label>
<input type="range" min="0.0" max="1.0" step="0.01" value="0.5" class="slider" id="radius">
</div>
<div>
<label for="velocity_dissipation">velocity dissipation</label>
<input type="range" min="0.0" max="1.0" step="0.001" value="0.25" class="slider" id="velocity_dissipation">
</div>
<div>
<label for="density_dissipation">density dissipation</label>
<input type="range" min="0.0" max="1.0" step="0.001" value="0.5" class="slider" id="density_dissipation">
</div>
<fieldset id="display_radio">
<div>
<input type="radio" id="dye" name="display" value="dye" checked>
<label for="dye">dye</label>
</div>
<div>
<input type="radio" id="velocity" name="display" value="velocity">
<label for="velocity">velocity</label>
</div>
<div>
<input type="radio" id="display_pressure" name="display" value="pressure">
<label for="display_pressure">pressure</label>
</div>
</fieldset>
</form>
<canvas id="fluidsim_canvas" style="background-color: black;" ></canvas>
<script src="script.min.js"></script>
</body>
</html>