pub struct Demo {
pub autoplay: bool,
pub frame: u64,
/* private fields */
}Expand description
Native flags: --autoplay, --smoke-frames N, --screenshot path.png.
Browser and mobile launches default to interactive play.
Fields§
§autoplay: bool§frame: u64Implementations§
Source§impl Demo
impl Demo
pub fn new() -> Demo
Sourcepub fn dt(&self) -> f32
pub fn dt(&self) -> f32
Smoke runs use a reproducible render timestep; simulation should still use FixedClock.
pub fn time(&self) -> f32
Sourcepub fn finish_frame(&mut self) -> bool
pub fn finish_frame(&mut self) -> bool
Call after all drawing and before next_frame. Returns true when the run is finished.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Demo
impl RefUnwindSafe for Demo
impl Send for Demo
impl Sync for Demo
impl Unpin for Demo
impl UnwindSafe for Demo
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