aevyrie / bevy_framepace

Framepacing and framelimiting for Bevy
https://crates.io/crates/bevy_framepace
Apache License 2.0
245 stars 23 forks source link

WASM: Limiter::from_framerate(30.0) not working #38

Closed chaoticgood1 closed 1 year ago

chaoticgood1 commented 1 year ago

It works on native build, but running cargo make web for wasm doesn't limit the framerate. Thanks.

Here is my repo test: https://github.com/Nickan/bevytest/tree/BevyFramepace

Edit: Provide github repo link

aevyrie commented 1 year ago

Framelimiting/pacing is disabled on WASM so as not to compete with the browser's framepacer. Enabling pacing/limiting on WASM builds does not work anyway. I have been unable to get it to work, in part because precising sleep and timing in WASM are not trivial.