feat: move registry and runtime into separate packages
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m32s

This commit is contained in:
2024-05-05 15:11:53 +02:00
parent f4853821d4
commit a01a409b97
29 changed files with 205 additions and 156 deletions

View File

@@ -2,15 +2,13 @@
import { humanizeDuration, humanizeNumber } from "$lib/helpers";
import localStore from "$lib/helpers/localStore";
import SmallGraph from "./SmallGraph.svelte";
import type { PerformanceData, PerformanceStore } from "./store";
import type { PerformanceData, PerformanceStore } from "@nodes/utils";
export let store: PerformanceStore;
const open = localStore("node.performance.small.open", {
runtime: false,
fps: false,
vertices: false,
faces: false,
});
$: vertices = $store?.at(-1)?.["total-vertices"][0] || 0;
@@ -54,29 +52,15 @@
</tr>
{/if}
<tr on:click={() => ($open.vertices = !$open.vertices)}>
<td>{$open.vertices ? "-" : "+"} vertices </td>
<tr>
<td>vertices </td>
<td>{humanizeNumber(vertices || 0)}</td>
</tr>
{#if $open.vertices}
<tr>
<td colspan="2">
<SmallGraph points={getPoints($store, "total-vertices")} />
</td>
</tr>
{/if}
<tr on:click={() => ($open.faces = !$open.faces)}>
<td>{$open.faces ? "-" : "+"} faces </td>
<tr>
<td>faces </td>
<td>{humanizeNumber(faces || 0)}</td>
</tr>
{#if $open.faces}
<tr>
<td colspan="2">
<SmallGraph points={getPoints($store, "total-faces")} />
</td>
</tr>
{/if}
</table>
</div>