pub struct AppState {Show 13 fields
pub current_pane: Pane,
pub animation_time: f32,
pub paused: bool,
pub rotation_angle: f32,
pub mouse_dragging: bool,
pub last_mouse_x: f32,
pub snake_time: f32,
pub settings_dropdown_open: bool,
pub settings_dropdown_pos: Option<Pos2>,
pub about_open: bool,
pub frame_time_ms: Option<f32>,
pub frame_time_display_ms: Option<f32>,
pub frame_time_last_display_s: Option<f64>,
}Expand description
Mutable application state used by the GUI.
Fields§
§current_pane: PaneCurrently selected pane.
animation_time: f32Accumulated animation time in seconds.
paused: boolGlobal pause state for animations.
rotation_angle: f32Current rotation angle for the 3D view (radians).
mouse_dragging: boolWhether the user is currently dragging in the 3D view.
last_mouse_x: f32Last X coordinate recorded during a drag gesture.
snake_time: f32Accumulated time used to advance the snake animation.
settings_dropdown_open: boolWhether the settings dropdown is currently open.
settings_dropdown_pos: Option<Pos2>Persisted position for the settings dropdown to avoid frame-to-frame jitter.
about_open: boolWhether the About dialog is currently open.
frame_time_ms: Option<f32>Smoothed frame time in milliseconds (for dev overlay).
frame_time_display_ms: Option<f32>Latched frame time used for the UI (updates slowly for readability).
frame_time_last_display_s: Option<f64>Last time (seconds) the display value was latched.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnwindSafe for AppState
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.