pub struct Act { /* private fields */ }Expand description
An Act is a named segment of time with animated properties.
Implementations§
Source§impl Act
impl Act
Sourcepub fn hold(name: impl Into<String>, duration: f64) -> Self
pub fn hold(name: impl Into<String>, duration: f64) -> Self
Create a hold act (no animations, just wait).
Sourcepub fn transition(name: impl Into<String>, duration: f64) -> Self
pub fn transition(name: impl Into<String>, duration: f64) -> Self
Create a transition act with a specific duration.
Sourcepub fn animate<T: Animatable>(
self,
property: impl Into<String>,
from: T,
to: T,
easing: Easing,
) -> Self
pub fn animate<T: Animatable>( self, property: impl Into<String>, from: T, to: T, easing: Easing, ) -> Self
Add a simple from->to animation for a property.
Sourcepub fn track<T: Animatable>(
self,
property: impl Into<String>,
track: Track<T>,
) -> Self
pub fn track<T: Animatable>( self, property: impl Into<String>, track: Track<T>, ) -> Self
Add a track with full keyframe control.
Sourcepub fn spring<T: Animatable>(
self,
property: impl Into<String>,
from: T,
to: T,
spring: Spring,
) -> Self
pub fn spring<T: Animatable>( self, property: impl Into<String>, from: T, to: T, spring: Spring, ) -> Self
Sourcepub fn spring_track<T: Animatable>(
self,
property: impl Into<String>,
track: SpringTrack<T>,
) -> Self
pub fn spring_track<T: Animatable>( self, property: impl Into<String>, track: SpringTrack<T>, ) -> Self
Add a spring track with full control.
Sourcepub fn stagger<T: Animatable>(
self,
property: impl Into<String>,
count: usize,
from: T,
to: T,
easing: Easing,
) -> Self
pub fn stagger<T: Animatable>( self, property: impl Into<String>, count: usize, from: T, to: T, easing: Easing, ) -> Self
Sourcepub fn stagger_config<T: Animatable>(
self,
property: impl Into<String>,
config: StaggerConfig<T>,
) -> Self
pub fn stagger_config<T: Animatable>( self, property: impl Into<String>, config: StaggerConfig<T>, ) -> Self
Sourcepub fn stagger_track<T: Animatable>(
self,
property: impl Into<String>,
track: StaggerTrack<T>,
) -> Self
pub fn stagger_track<T: Animatable>( self, property: impl Into<String>, track: StaggerTrack<T>, ) -> Self
Add a stagger track directly.
Sourcepub fn get_duration(&self) -> f64
pub fn get_duration(&self) -> f64
Get the duration of this act in seconds.
Sourcepub fn has_stagger(&self, property: &str) -> bool
pub fn has_stagger(&self, property: &str) -> bool
Check if this act has a stagger track for the given property.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Act
impl !RefUnwindSafe for Act
impl !Send for Act
impl !Sync for Act
impl Unpin for Act
impl !UnwindSafe for Act
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