---
---
## Wasm Test
<link rel="manifest" href="./manifest.json">
<link rel="icon" type="image/png" href="./resources/assets/vanilla/texture/logo/logo-1024x1024-color.png">
<link rel="icon" type="image/svg+xml" href="./resources/assets/vanilla/texture/logo/logo.svg">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<link rel="license" href="./pkg/LICENSE">
<canvas id="catgirl-engine-canvas"></canvas>
<script>
if ('serviceWorker' in navigator) {
if (window.performance && performance.mark) {
performance.mark("Service-Worker: Register");
}
navigator.serviceWorker.register("./service-worker.js");
}
</script>
<script type="module">
if (window.performance && performance.mark) {
performance.mark("Wasm: Download");
}
import init, * as engine from "./pkg/main.js";
window.addEventListener('load', async function () {
if (window.performance && performance.mark) {
performance.mark("Wasm: Initialize");
}
try {
await init();
} catch(error) {
return;
}
if (window.performance && performance.mark) {
performance.mark("Wasm: Loaded");
}
console.log("WASM Loaded");
console.debug("%cYou can gain access to the engine's functions by calling %cgetEngine()", "color: orange; font-weight: bold; font-size: 200%", "color: purple; font-weight: bold; font-size: 200%");
});
export function getEngine() {
return engine;
}
globalThis.getEngine = getEngine
</script>