feat:add game!

This commit is contained in:
lennlouisgeek
2026-04-06 02:56:40 +08:00
parent 1c5ac13da8
commit aeb17f194c
4 changed files with 1294 additions and 116 deletions

View File

@@ -28,6 +28,7 @@
export let rangeMin = 0;
export let rangeMax = 16000;
export let colorMapPreset: PressureColorMapPreset = "emerald";
export let showStatsPanel = true;
let viewerEl: HTMLDivElement | undefined;
let canvasEl: HTMLCanvasElement | undefined;
@@ -608,26 +609,28 @@
<div class="viewer-vignette" aria-hidden="true"></div>
<div class="viewer-noise" aria-hidden="true"></div>
<div class="viewer-controls">
<section class="stats-panel" aria-label="Pressure Summary">
<p class="stats-label">Pressure Matrix</p>
<div class="stats-grid">
<article class="stats-card stats-card-wide">
<span class="stats-key">Total Pressure</span>
<strong class="stats-value">{stats.total.toFixed(0)}</strong>
</article>
<article class="stats-card">
<span class="stats-key">Max</span>
<strong class="stats-value">{stats.max.toFixed(0)}</strong>
</article>
<article class="stats-card">
<span class="stats-key">Avg</span>
<strong class="stats-value">{stats.avg.toFixed(0)}</strong>
</article>
</div>
<p class="stats-note">{statsNote}</p>
</section>
</div>
{#if showStatsPanel}
<div class="viewer-controls">
<section class="stats-panel" aria-label="Pressure Summary">
<p class="stats-label">Pressure Matrix</p>
<div class="stats-grid">
<article class="stats-card stats-card-wide">
<span class="stats-key">Total Pressure</span>
<strong class="stats-value">{stats.total.toFixed(0)}</strong>
</article>
<article class="stats-card">
<span class="stats-key">Max</span>
<strong class="stats-value">{stats.max.toFixed(0)}</strong>
</article>
<article class="stats-card">
<span class="stats-key">Avg</span>
<strong class="stats-value">{stats.avg.toFixed(0)}</strong>
</article>
</div>
<p class="stats-note">{statsNote}</p>
</section>
</div>
{/if}
</div>
<style>