<script type="module">
import raylib from 'raylib.js'
raylib(canvas, InitGame, UpdateGame)
</script>
One issue is that I really like not having the raylib. namespace in the callbacks (which I currently handle with globalize()) but it would be nice if it would use the right instance inside the callback. I think #1 might help with that.
If the wasm & emscripten JS was inlined on build, I could have a single import, and also do non-async setup.
and
One issue is that I really like not having the
raylib.
namespace in the callbacks (which I currently handle withglobalize()
) but it would be nice if it would use the right instance inside the callback. I think #1 might help with that.