mirror of
https://github.com/Floriansylvain/WhateverWebGPU.git
synced 2026-08-19 11:43:26 +02:00
feat: enhance UI layout with controls panel and FPS overlay
This commit is contained in:
+25
-16
@@ -3,28 +3,37 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/webgpu.svg" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Whatever WebGPU</title>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="canvas" width="1024" height="1024"></canvas>
|
||||
<p id="fps">FPS:</p>
|
||||
<div>
|
||||
<label for="compute-interval-slider"
|
||||
>Compute Interval (ms):
|
||||
<span id="compute-interval-value">100</span></label
|
||||
>
|
||||
<div>
|
||||
<input
|
||||
id="compute-interval-slider"
|
||||
type="range"
|
||||
min="1"
|
||||
max="200"
|
||||
value="100"
|
||||
/>
|
||||
<div id="app">
|
||||
<div id="canvas-container">
|
||||
<canvas id="canvas" width="1024" height="1024"></canvas>
|
||||
<div id="overlay">
|
||||
<span id="fps">FPS: --</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="controls-panel">
|
||||
<h2>Controls</h2>
|
||||
<label>
|
||||
Simulation interval
|
||||
<input
|
||||
type="range"
|
||||
id="compute-interval-slider"
|
||||
min="1"
|
||||
max="1000"
|
||||
value="100"
|
||||
/>
|
||||
<div><span id="compute-interval-value">100</span> ms</div>
|
||||
</label>
|
||||
<button id="reset-button">Reset Grid</button>
|
||||
</div>
|
||||
</div>
|
||||
<button id="reset-button">Reset Grid</button>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user