-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (55 loc) · 2.78 KB
/
index.html
File metadata and controls
57 lines (55 loc) · 2.78 KB
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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="origin-trial" content="AlmoXD7g6MZqmbK2+XAmFl9LuRALbbGdLFBzci+RdR8cTikHgKp6EvcxjUPBQogSrvaahhjgIdwJwwj5yHsiyAEAAAB9eyJvcmlnaW4iOiJodHRwczovL21hbmdvc2hpcC5naXRodWIuaW86NDQzIiwiZmVhdHVyZSI6IlVucmVzdHJpY3RlZFNoYXJlZEFycmF5QnVmZmVyIiwiZXhwaXJ5IjoxNjU4ODc5OTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZX0=">
<meta http-equiv="origin-trial" content="Ag3/zyOnZlA2UGqSGpvDSdv2is7iezJfre6xK0TqH1s/NVRP8rsgvkgwJsfLlAcE0c4KpOKZMPqMal43QFBodQcAAABmeyJvcmlnaW4iOiJodHRwczovL21hbmdvc2hpcC5naXRodWIuaW86NDQzIiwiZmVhdHVyZSI6IldlYkdQVSIsImV4cGlyeSI6MTY1MjgzMTk5OSwiaXNTdWJkb21haW4iOnRydWV9">
<title>WebGPU N-Body Simulation</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="dist/stylesheet.css" />
</head>
<body>
<div>
<h1>N-Body Simulation</h1>
<div class = "body">
<label> Current Simulation Type: </label>
<text id="currentType" style="font-weight: bold"></text>
<br>
<label> Current Number of Particles: </label>
<text id=currentNumParticles style="font-weight: bold"></text>
<br>
<label> Current Number of Threads: </label>
<text id=currentNumThreads style="font-weight: bold"></text>
<br>
<label> Current Theta Value: </label>
<text id=currentThetaValue style="font-weight: bold"></text>
<div id="fps" style="font-weight: bold"></div>
</div>
<canvas id="canvasWebGPU" width="640" height="640"></canvas>
<canvas id="canvasCPU" width="640" height="640" style="display:none"></canvas>
<div class="body" id="updateSimulation">
<label> Simulation Type: </label>
<text id="changeType" style="font-weight:bold"></text>
<input type="radio" name="typeButton" value="CPU">CPU</button>
<input type="radio" name="typeButton" value="CPUQuad(SingleThread)">CPUQuad(SingleThread)</button>
<input type="radio" name="typeButton" value="WebGPU" checked>WebGPU</button>
<br>
<label> Number of Particles: </label>
<input type="number" id="numParticles" min="0" value="1000">
<div class="thetaValue">
<label> Theta: </label>
<input type="range" id="thetaRange" min="0" max="1" step="0.1" value="0.5">
<text id="thetaText">0.5</text>
</div>
<div class="numThreads">
<label> Number of Threads: </label>
<input type="number" id="numThreads" min="1" value="1">
</div>
<br>
<button type=button id="updateButton">Update</button>
</div>
</div>
<script src="dist/main.bundle.js"></script>
</body>
</html>