-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On the web, we have a separate render_loop (for window.requestAnimationFrame) and events_loop (for winit/window events), so `game` and `ui_container` are shared using an `Rc<RefCell>`, and `winit_window` as well for wasm only (on native, `glutin_window` which provides access to the winit window is used instead). With these changes, events (hover, click, etc.) and rendering now work in the web. Another step towards 🕸️ Web support (#446) * wasm: enable events loop * Use Rc<RefCell>'s for winit_window * Use Rc<RefCell> for game and ui_container * main: disable set_cursor_grab() call on wasm to get further until Pointer Lock is available
- Loading branch information
Showing
1 changed file
with
54 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters