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:
14
data/globals.js
Normal file
14
data/globals.js
Normal 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,
|
||||
};
|
||||
Reference in New Issue
Block a user