Bevy Web Utils

Helpers for working with Bevy on the web

Bindings

This crate includes wasm_bindgen bindings to some JS snippets that help with various web tasks, that can be accessed from the micro_bevy_web_utils::bindings module

Bevy System

Touch events will only be intercepted after at least one successful call to bind_selector_touch_events

To dispatch touch events recorded by this library, you can add the micro_bevy_web_utils::bevy::emit_touch_events system. You will then receive intercepted touch events in any other system that uses the Touches or EventReader<TouchInput> resources.

Alternatively, you can manually use the take_touch_events binding to get all the recorded touch events. They must be handled and/or dispatched after being taken, or they will be lost - there is no double buffering or equivalent