aevyrie/bevy_framepace
aevyrie/bevy_framepace has 385 GitHub stars and 56 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 17:58 UTC. Last push 2026-11-05.
Framepacing and framelimiting for Bevy
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalUsage
It's as simple as adding the plugin to your app:
app.add_plugins(bevy_framepace::FramepacePlugin);
By default, the plugin will automatically measure your framerate and use this for framepacing.
You can adjust the framerate limit at runtime by modifying theFramepaceSettings resource. For
example, to set the framerate limit to 30fps:
settings.limiter = Limiter::from_framerate(30.0),
See demo.rs in the examples folder, or run with:
cargo run --release --example demo
How it works
The plugin works by recording how long it takes to render each frame, and sleeping the main thread until the desired frametime is reached. This ensures the next frame isn't started until the very last moment, delaying the event loop from restarting. By delaying the event loop, and thus input collection, this reduces motion-to-photon latency by moving reading input closer to rendering the frame.
The spin_sleep dependency is needed for precise sleep times. The sleep function in the standard
library is not accurate enough for this application, especially on Windows.
Bevy Version Support
I intend to track the main branch of Bevy. PRs supporting this are welcome!
| bevy | bevy_framepace |
|---|---|
| 0.20 | 0.23 |
| 0.19 | 0.22 |
| 0.18 | 0.21 |
| 0.17 | 0.20 |
| 0.16 | 0.19 |
| 0.15 | 0.18 |
| 0.14 | 0.17 |
| 0.13 | 0.15, 0.16 |
| 0.12 | 0.14 |
| 0.11 | 0.13 |
| 0.10 | 0.12 |
| 0.9 | 0.7, 0.8, 0.9, 0.10, 0.11 |
| 0.8 | 0.5, 0.6 |
| 0.7 | 0.4 |
| 0.6 | 0.3 |
License
bevy_framepace is free, open source and permissively licensed! Except where noted (below and/or in
individual files), all code in this repository is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.
Your contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Explore related projects
ytdl-org/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
141,500 starsexcalidraw/excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
135,396 starsgodotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
119,840 starsmrdoob/three.js
JavaScript 3D Library.
117,905 stars