pub enum TransitionType {
FadeBlack {
out_time: f32,
hold_time: f32,
in_time: f32,
},
Dissolve {
duration: f32,
},
SlideLeft {
duration: f32,
},
SlideRight {
duration: f32,
},
ZoomIn {
duration: f32,
},
ChaosWipe {
duration: f32,
},
Cut,
}Expand description
Visual effect used for the screen transition.
Variants§
FadeBlack
Classic fade to/from black.
Dissolve
Noise-based dissolve between screens.
SlideLeft
Slide the old screen out to the left, new screen in from the right.
SlideRight
Slide the old screen out to the right, new screen in from the left.
ZoomIn
Zoom into center, then new screen appears.
ChaosWipe
Chaos field particles sweep across the screen as a wave.
Cut
No visual — instant cut.
Implementations§
Source§impl TransitionType
impl TransitionType
Sourcepub fn total_duration(&self) -> f32
pub fn total_duration(&self) -> f32
Total duration of the transition in seconds.
Sourcepub fn swap_point(&self) -> f32
pub fn swap_point(&self) -> f32
Normalized time at which the state swap should occur (0.0 to 1.0).
Trait Implementations§
Source§impl Clone for TransitionType
impl Clone for TransitionType
Source§fn clone(&self) -> TransitionType
fn clone(&self) -> TransitionType
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 moreAuto Trait Implementations§
impl Freeze for TransitionType
impl RefUnwindSafe for TransitionType
impl Send for TransitionType
impl Sync for TransitionType
impl Unpin for TransitionType
impl UnsafeUnpin for TransitionType
impl UnwindSafe for TransitionType
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.