Set up a basic "front-end" for the webassembly module to be tested locally from a data folder (I use python -m http.server). The WebAssembly application is now responsible for all setup/rendering through the WebGL2 context.

This commit is contained in:
2025-09-01 12:13:56 -07:00
parent cca61ea163
commit b548b7bb26
14 changed files with 1416 additions and 14 deletions

14
data/globals.js Normal file
View File

@@ -0,0 +1,14 @@
export const WASM_MEMORY_PAGE_SIZE = (64 * 1024); //64kB or 65,536b
export const WASM_MEMORY_MAX_NUM_PAGES = (64 * 1024) //65,536 pages * 64 kB/page = 4GB
export const WASM_MEMORY_MAX_SIZE = (WASM_MEMORY_MAX_NUM_PAGES * WASM_MEMORY_PAGE_SIZE)
export var appGlobals =
{
heapBase: 0,
canvas: null,
glContext: null,
memDataView: null,
wasmModule: null,
textDecoder: null,
};