konsumer / raylib-wasm

Ideas around a wasm runtime for raylib (to make raylib games in js & browser)
https://konsumer.js.org/raylib-wasm/
MIT License
22 stars 3 forks source link

web-component #1

Closed konsumer closed 1 year ago

konsumer commented 1 year ago

It would be nice to have a web-component, something like:

<script src="raylib-component.js"></script>

<raylib>
<script>
  async function InitGame() {}
  function UpdateGame(ts) {}
</script>
</raylib>

This would allow for lots of independent and clear examples on a single page.

I need a way to tie a single code-chunk into canvas/raylib-instance.

konsumer commented 1 year ago

I started work on this idea here. Still not sure how to properly strip the raylib. namespace