Crate bevy_ratepace
source ·Expand description
§bevy_ratepace
bevy_ratepace is a crate to configure the update frequency of headless bevy. The code is based on https://github.com/aevyrie/bevy_framepace.
§How to use
Add to your project with:
cargo add bevy_ratepaceAdd ratepace as a plugin:
fn set_frame_rate(mut settings: ResMut<ratepace::RatepaceSettings>)
{
settings.limiter = ratepace::Limiter::from_framerate(10);
}
App::new()
.add_systems(
Startup,
(
set_frame_rate,
),
)
.add_plugins((ratepace::RatepacePlugin));Structs§
- Tracks the instant of the end of the previous frame.
- Adds framepacing and framelimiting functionality to your
App. - Framepacing plugin configuration.
- Holds frame time measurements for framepacing diagnostics
Enums§
- Configures the framelimiting technique for the app.