mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2025-01-08 14:13:51 +03:00
46cbd19e60
While it doesn't happen right now in this particular example, `lastPtr` can be potentially overridden several times before the module is fully initialised. Rather than having a boolean and a storage for one last argument, `await` a promise returned from `wasm_bindgen` itself in the new `onmessage` handler before executing actual command. This way all the potential tasks will queue up naturally, wait for the initialisation, and then execute in a correct order. |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
build.sh | ||
Cargo.toml | ||
index.html | ||
index.js | ||
README.md | ||
worker.js |
Parallel Raytracing
View documentation for this example online or View compiled example online
You can build the example locally with:
$ ./build.sh
(or running the commands on Windows manually)
and then visiting http://localhost:8080 in a browser should run the example!