-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
68 lines (59 loc) · 2.55 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
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Real-Time Fluid Dynamics for Games</title>
<link rel="stylesheet" href="https://unpkg.com/@picocss/[email protected]/css/pico.min.css">
<link rel="stylesheet" href="assets/style.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-V88570L8T1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-V88570L8T1');
</script>
</head>
<body>
<header>
<h2>Real-Time Fluid Dynamics In Javascript</h2>
<details open>
<summary>About</summary>
<p>Click and drag (inside the white border; touch and drag on mobile) to add density. Move the mouse over the
canvas to move the fluid
around.</p>
<p>You can change the simulation parameters in real-time using the GUI on the left.</p>
<p>Based on Jos Stam's paper <a
href="https://www.dgp.toronto.edu/public_user/stam/reality/Research/pdf/GDC03.pdf" target="_blank">Real-Time
Fluid Dynamics for Games</a>.</p>
<p>Simulates the <a href="https://en.wikipedia.org/wiki/Navier-Stokes_equations" target="_blank">Navier-Stokes
equations</a> for incompressible fluids.</p>
</details>
<details>
<summary>Source Code</summary>
<p>Can be found on my <a href="https://github.com/topaz1008/canvas-fluid-solver/" target="_blank">Github</a>.
</p>
</details>
<details>
<summary>Credits</summary>
<p>The demo uses <a href="https://github.com/georgealways/lil-gui" target="_blank">lil-gui</a> for the GUI</p>
<p>I've looked at other implementations while making this, but the links are very old and are now dead and/or
insecure.</p>
<p>The best reference is the original paper which is still online and contains a very clear explanation of the
solver and methods it uses. It also contains a complete C implementation of the solver.</p>
</details>
</header>
<main id="main-grid" class="t1008-grid">
<div id="gui-container">
<!-- lil-gui container -->
</div>
<div id="canvas-container">
<canvas id="main-canvas"></canvas>
</div>
</main>
<!--<footer></footer>-->
<script src="src/main.js" type="module"></script>
</body>
</html>