aevyrie / bevy_framepace

Framepacing and framelimiting for Bevy

Home Page:https://crates.io/crates/bevy_framepace

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Store frame time, not frame rate

alice-i-cecile opened this issue · comments

When used, we're taking the inverse every frame (and converting it to an f32).

Instead, store an f32 frame time in the FrameRateLimit resource (see #10) and use that directly to save on wasted work and reduce complexity.

Provider helper methods to allow users to specify the settings with either frame rates or frame times.

Yeah, I waffled on this a bit, I think you're right that this is a better approach.