diff --git a/src/Zig-JS_Bridge.js b/src/Zig-JS_Bridge.js index c8d4761..80ba882 100644 --- a/src/Zig-JS_Bridge.js +++ b/src/Zig-JS_Bridge.js @@ -1,14 +1,14 @@ mergeInto(LibraryManager.library, { - WASMSave: function(pointer, length) { + WASMSave: function (pointer, length) { const settings = UTF8ToString(pointer, length); Settings.save(settings); }, - WASMLoad: function() { + WASMLoad: function () { const settings = Settings.get(); const ptr = allocateUTF8(settings); return ptr; }, - WASMLoaded: function(ptr) { + WASMLoaded: function (ptr) { Module._free(ptr); } }); \ No newline at end of file diff --git a/src/asteroids-website/src/app.d.ts b/src/asteroids-website/src/app.d.ts index cac20d7..d993e09 100644 --- a/src/asteroids-website/src/app.d.ts +++ b/src/asteroids-website/src/app.d.ts @@ -1,3 +1,5 @@ +import type { MiniAudio } from "./types/miniaudio"; + // See https://kit.svelte.dev/docs/types#app // for information about these interfaces declare global { @@ -7,7 +9,8 @@ declare global { // interface PageData {} // interface Platform {} } - declare interface Window { + interface Window extends Window { Settings: Settings; + miniaudio: MiniAudio | undefined = undefined; } } \ No newline at end of file diff --git a/src/asteroids-website/src/app.html b/src/asteroids-website/src/app.html index f9d0cbd..c051e18 100644 --- a/src/asteroids-website/src/app.html +++ b/src/asteroids-website/src/app.html @@ -1,14 +1,23 @@ -
- - - - - %sveltekit.head% - - -