Used __builtin_wasm_memory_size(0) instead of having the Javascript code call init_mem with the initial page count. Added a simple <div> below the canvas that can hold any number of labels that can be filled/updated through jsSetLabel which lives in a new file misc_functions.js.
This commit is contained in:
12
cwasm_misc_js_imports.h
Normal file
12
cwasm_misc_js_imports.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
File: cwasm_misc_js_imports.h
|
||||
Author: Taylor Robbins
|
||||
Date: 09\02\2025
|
||||
*/
|
||||
|
||||
#ifndef _CWASM_MISC_JS_IMPORTS_H
|
||||
#define _CWASM_MISC_JS_IMPORTS_H
|
||||
|
||||
MAYBE_EXTERN_C void jsSetLabel(const char* labelIdStr, const char* labelStr);
|
||||
|
||||
#endif // _CWASM_MISC_JS_IMPORTS_H
|
||||
Reference in New Issue
Block a user