pub struct GameLoopConfig {
pub fixed_dt: f32,
pub max_frame_time: f32,
pub target_fps: u32,
}Expand description
Configuration for the game loop
Fields§
§fixed_dt: f32Fixed timestep for physics updates (seconds)
max_frame_time: f32Maximum frame time to prevent spiral of death
target_fps: u32Target frames per second (0 = unlimited)
Implementations§
Source§impl GameLoopConfig
impl GameLoopConfig
Sourcepub const fn default_60fps() -> Self
pub const fn default_60fps() -> Self
Default configuration (60 FPS physics, 120 FPS cap)
Sourcepub const fn high_refresh() -> Self
pub const fn high_refresh() -> Self
Configuration for high refresh rate displays
Trait Implementations§
Source§impl Clone for GameLoopConfig
impl Clone for GameLoopConfig
Source§fn clone(&self) -> GameLoopConfig
fn clone(&self) -> GameLoopConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GameLoopConfig
impl Debug for GameLoopConfig
Source§impl Default for GameLoopConfig
impl Default for GameLoopConfig
Source§impl<'de> Deserialize<'de> for GameLoopConfig
impl<'de> Deserialize<'de> for GameLoopConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GameLoopConfig
impl PartialEq for GameLoopConfig
Source§impl Serialize for GameLoopConfig
impl Serialize for GameLoopConfig
impl StructuralPartialEq for GameLoopConfig
Auto Trait Implementations§
impl Freeze for GameLoopConfig
impl RefUnwindSafe for GameLoopConfig
impl Send for GameLoopConfig
impl Sync for GameLoopConfig
impl Unpin for GameLoopConfig
impl UnwindSafe for GameLoopConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more