-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (54 loc) · 2.07 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WebGPU nBody</title>
</head>
<body>
<div id="ui">
<div id="fpsText">FPS: 00</div>
<hr />
<div id="bodiesText">Bodies: 0</div>
<hr />
<button id="restartButton">Restart</button>
<hr />
<label>
<div id="gravityText">Gravity: 0</div>
<input type="range" id="gravitySlider" min="1" max="100" value="5" />
</label>
<label>
<div id="bhMassText">Blackhole mass: 0</div>
<input type="range" id="bhMassSlider" min="10" max="22" value="14" />
</label>
<label>
<div id="spinText">Initial spin: 0</div>
<input type="range" id="spinSlider" min="0" max="200" value="30" />
</label>
<hr />
<label class="uiCb">
<input type="checkbox" id="twinGalaxiesToggle" />
<span>Twin galaxies</span>
</label>
</div>
<a
href="https://github.com/jtsorlinis/nBodyWebGPU"
target="_blank"
rel="noopener noreferrer"
id="sourceButton"
>
<svg
style="width: 24px"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 640 512"
>
<!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path
d="M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"
/>
</svg>
</a>
<canvas id="renderCanvas" touch-action="none"></canvas>
<script type="module" src="/src/main.ts"></script>
</body>
</html>