Replies: 2 comments 1 reply
-
This might be a useful reference |
Beta Was this translation helpful? Give feedback.
1 reply
-
Recently, I made a simple example to render bevy natively in the tauri window and use tauri's event loop driven the bevy rendering. You can check out this: https://github.com/sunxfancy/BevyTauriExample |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to reuse https://github.com/OpenWebGAL/WebGAL for story telling, and switch to bevy to render gameplay part.
Now I successfully write some React based UI (pick/create save file) and start the app via tauri, and run the Bevy main loop on a separate thread on tauri main process.
Is it possible to let Bevy render a canvas on the webpage, or join its own window to bevy window when needed?
A workaround will be write the rendering using https://github.com/pixijs/pixi-react , and copy all necessary entity via tauri IPC. I'm not sure if this will be too slow, but according to https://bevy-cheatbook.github.io/gpu/intro.html , Bevy is also copying all necessary entity from App World to Render World, so the cost may be acceptable.
Another idea could be write a custom render pipeline (I'm not sure about this, I haven't study graphic yet), that only do the serialization and IPC. And I can start a wasm version of bevy that deserialize the data, and render on a canvas. Seems harder than use react-pixi, but this will allow reuse all features of bevy rendering.
Beta Was this translation helpful? Give feedback.
All reactions