Make the web app work offline and update itself (#239)

This commit is contained in:
Jan Szumiec authored and GitHub committed 2026-10-13 23:40:19 -04:00
1 parent 09b5da3e9f
commit 4bea4c7785
14 files changed
+1246 -6

No files matched your search

+6
View File
@@ -32,5 +32,11 @@
<body>
<canvas id="solidcraft_canvas"></canvas>
<div id="solidcraft_loading">Loading SolidCraft&hellip;</div>
<script>
// Offline use and updates (sw.js; written into release builds by `cargo xtask web-offline`).
if ("serviceWorker" in navigator) {
addEventListener("load", () => navigator.serviceWorker.register("sw.js").catch(() => {}));
}
</script>
</body>
</html>