Closed ptdecker closed 7 months ago
Has anyone been able to get the canvas rendering working in 2024?
Got the above resolved:
'import { memory } from "wasm-game-of-life/wasm_game_of_life_bg";'
needs to be:
import { memory } from "wasm-game-of-life/wasm_game_of_life_bg.wasm";
No use submitting a PR to fix it given none are being accepted
Where in the docs did you come across this?
In section 4.4 Implementing Life, canvas rendering section
Describe what about it does not make sense
Receiving error when trying to run
Why does it not make sense?
It doesn't work
How could we improve it?
Suggestions on how to debug
Now that the template preliminaries are out of the way, has anyone been able to get this line to work:
import { memory } from "wasm-game-of-life/wasm_game_of_life_bg";
When I try it, webpack gives me the following error:
I inspected the generated wasm_game_of_life_bg.js file and can see nowhere that 'memory' is defined in it.
I do see:
Do I need to be using getUnit8Memmory0() somehow instead? If so, how??
Thank you for your help in advance