pub struct JugarConfig {
pub width: u32,
pub height: u32,
pub target_fps: u32,
pub fixed_timestep: f32,
pub max_delta: f32,
pub vsync: bool,
pub title: String,
}Expand description
Engine configuration
Fields§
§width: u32Window/canvas width
height: u32Window/canvas height
target_fps: u32Target frames per second
fixed_timestep: f32Fixed timestep for physics (in seconds)
max_delta: f32Maximum delta time (to prevent spiral of death)
vsync: boolEnable vsync
title: StringApplication title
Implementations§
Source§impl JugarConfig
impl JugarConfig
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Sets the title
Sourcepub const fn with_target_fps(self, fps: u32) -> Self
pub const fn with_target_fps(self, fps: u32) -> Self
Sets the target FPS
Sourcepub fn mobile_portrait() -> Self
pub fn mobile_portrait() -> Self
Mobile portrait preset
Sourcepub fn mobile_landscape() -> Self
pub fn mobile_landscape() -> Self
Mobile landscape preset
Sourcepub fn super_ultrawide() -> Self
pub fn super_ultrawide() -> Self
Super ultrawide 32:9 preset
Trait Implementations§
Source§impl Clone for JugarConfig
impl Clone for JugarConfig
Source§fn clone(&self) -> JugarConfig
fn clone(&self) -> JugarConfig
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 JugarConfig
impl Debug for JugarConfig
Source§impl Default for JugarConfig
impl Default for JugarConfig
Source§impl<'de> Deserialize<'de> for JugarConfig
impl<'de> Deserialize<'de> for JugarConfig
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
Auto Trait Implementations§
impl Freeze for JugarConfig
impl RefUnwindSafe for JugarConfig
impl Send for JugarConfig
impl Sync for JugarConfig
impl Unpin for JugarConfig
impl UnwindSafe for JugarConfig
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