johanhelsing / matchbox

Painless peer-to-peer WebRTC networking for rust wasm (and native!)
Apache License 2.0
869 stars 72 forks source link

Create a GitHub pages site with the `bevy_ggrs` example #331

Closed johanhelsing closed 11 months ago

johanhelsing commented 11 months ago

Resolves #212

Code largely borrowed from bevy-shell-template

Supersedes: #244

johanhelsing commented 11 months ago

Trying to see if I can get the deploy job to pass...

This is rather unhelpful: image

johanhelsing commented 11 months ago

Okay, it's deploying now, but seems I glossed over the issue with the panic:

panicked at 'Cannot find element: #bevy_ggrs_example.', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_winit-0.11.2/src/winit_windows.rs:137:21
johanhelsing commented 11 months ago

Should also check why the artifact is 85 mb, maybe we're not building release builds?

johanhelsing commented 11 months ago

Alternatively, we can do this with just wasm-opt/wasm-pack, and we can use the same launcher I use for all the embeds on my blog:

https://johanhelsing.studio/bevy-embed?app=extreme_4

Should allow the example to stay simple stupid (no trunk/yew or anything), and no hacks for canvas elements.

simbleau commented 11 months ago

Should also check why the artifact is 85 mb, maybe we're not building release builds?

That would definitely be the case. My builds are usually <10MB in release mode when I deploy my entire game (which includes matchbox).

johanhelsing commented 11 months ago

Closing in favor of #335