feat: migrate to svelte 5
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 1m15s

This commit is contained in:
2024-04-30 14:20:12 +02:00
parent eafc9c99c8
commit c5a270f67a
43 changed files with 932 additions and 55714 deletions

View File

@ -13,9 +13,8 @@
"@nodes/ui": "link:../packages/ui",
"@nodes/utils": "link:../packages/utils",
"@sveltejs/kit": "^2.5.7",
"@threlte/core": "^7.3.0",
"@threlte/extras": "^8.11.2",
"@threlte/flex": "^1.0.2",
"@threlte/core": "next",
"@threlte/extras": "next",
"@types/three": "^0.164.0",
"@unocss/reset": "^0.59.4",
"comlink": "^4.4.1",
@ -26,14 +25,11 @@
"@iconify-json/tabler": "^1.1.110",
"@nodes/types": "link:../packages/types",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@sveltejs/vite-plugin-svelte": "next",
"@tsconfig/svelte": "^5.0.4",
"@unocss/preset-icons": "^0.59.4",
"@zerodevx/svelte-json-view": "^1.0.9",
"internal-ip": "^8.0.0",
"svelte": "^4.2.15",
"svelte": "5.0.0-next.118",
"svelte-check": "^3.7.0",
"three-inspect": "^0.4.5",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"unocss": "^0.59.4",
@ -41,6 +37,6 @@
"vite-plugin-comlink": "^4.0.3",
"vite-plugin-glsl": "^1.3.0",
"vite-plugin-wasm": "^3.3.0",
"vitest": "^1.5.2"
"vitest": "^1.5.3"
}
}

View File

@ -183,83 +183,101 @@
{#if data.length !== 0}
<h3>General</h3>
<table>
<tr>
<td>
{round(getTotalPerformance(!showAverage))}<span>ms</span>
</td>
<td
class:active={$activeType === "total"}
on:click={() => ($activeType = "total")}
>
total<span
>({Math.floor(1000 / getTotalPerformance(showAverage))}fps)</span
>
</td>
</tr>
{#each getPerformanceData(!showAverage) as [key, value]}
<tbody>
<tr>
<td>
{round(value)}<span>ms</span>
{round(getTotalPerformance(!showAverage))}<span>ms</span>
</td>
<td
class:active={$activeType === key}
on:click={() => ($activeType = key)}
class:active={$activeType === "total"}
on:click={() => ($activeType = "total")}
>
{key}
total<span
>({Math.floor(
1000 / getTotalPerformance(showAverage),
)}fps)</span
>
</td>
</tr>
{/each}
{#each getPerformanceData(!showAverage) as [key, value]}
<tr>
<td>
{round(value)}<span>ms</span>
</td>
<td
class:active={$activeType === key}
on:click={() => ($activeType = key)}
>
{key}
</td>
</tr>
{/each}
<tr>
<td>{data.length}</td>
<td>Samples</td>
</tr>
<h3>Nodes</h3>
<tr>
<td> {getCacheRatio(!showAverage)}<span>%</span> </td>
<td
class:active={$activeType === "cache-hit"}
on:click={() => ($activeType = "cache-hit")}>cache hits</td
>
</tr>
{#each getNodePerformanceData(!showAverage) as [key, value]}
<tr>
<td>{data.length}</td>
<td>Samples</td>
</tr>
</tbody>
<tbody>
<tr>
<td>
{round(value)}<span>ms</span>
</td>
<td
class:active={$activeType === key}
on:click={() => ($activeType = key)}
>
{key.split("/").slice(-1).join("/")}
<h3>Nodes</h3>
</td>
</tr>
{/each}
</tbody>
<tbody>
<tr>
<td> {getCacheRatio(!showAverage)}<span>%</span> </td>
<td
class:active={$activeType === "cache-hit"}
on:click={() => ($activeType = "cache-hit")}>cache hits</td
>
</tr>
{#each getNodePerformanceData(!showAverage) as [key, value]}
<tr>
<td>
{round(value)}<span>ms</span>
</td>
<h3>Viewer</h3>
<tr>
<td>{humanizeNumber(getLast("total-vertices"))}</td>
<td>Vertices</td>
</tr>
<tr>
<td>{humanizeNumber(getLast("total-faces"))}</td>
<td>Faces</td>
</tr>
{#each getViewerPerformanceData(!showAverage) as [key, value]}
<td
class:active={$activeType === key}
on:click={() => ($activeType = key)}
>
{key.split("/").slice(-1).join("/")}
</td>
</tr>
{/each}
</tbody>
<tbody>
<tr>
<td>
{round(value)}<span>ms</span>
</td>
<td
class:active={$activeType === key}
on:click={() => ($activeType = key)}
>
{key.split("/").slice(-1).join("/")}
<h3>Viewer</h3>
</td>
</tr>
{/each}
</tbody>
<tbody>
<tr>
<td>{humanizeNumber(getLast("total-vertices"))}</td>
<td>Vertices</td>
</tr>
<tr>
<td>{humanizeNumber(getLast("total-faces"))}</td>
<td>Faces</td>
</tr>
{#each getViewerPerformanceData(!showAverage) as [key, value]}
<tr>
<td>
{round(value)}<span>ms</span>
</td>
<td
class:active={$activeType === key}
on:click={() => ($activeType = key)}
>
{key.split("/").slice(-1).join("/")}
</td>
</tr>
{/each}
</tbody>
</table>
{:else}
<p>No runs available</p>