pub struct AnimationTransition {
pub from: String,
pub to: String,
pub duration_secs: f32,
pub exit_time: Option<f32>,
pub conditions: Vec<AnimationCondition>,
}Expand description
One directed transition between two states.
Fields§
§from: StringSource state name.
to: StringDestination state name.
duration_secs: f32Crossfade length in seconds between the outgoing and incoming poses. Zero snaps to the new state’s pose immediately.
exit_time: Option<f32>When set (0 to 1), the transition waits until the source state has
played this fraction of its clip. On a looping state the gate re-opens
every loop; on a non-looping state it stays open once reached. Useful
for letting a clip finish before leaving, e.g. 0.9 on a jump.
conditions: Vec<AnimationCondition>Conditions that must all pass (in addition to any exit_time gate).
An empty list always passes.
Trait Implementations§
Source§impl Clone for AnimationTransition
impl Clone for AnimationTransition
Source§fn clone(&self) -> AnimationTransition
fn clone(&self) -> AnimationTransition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AnimationTransition
impl Debug for AnimationTransition
Source§impl Default for AnimationTransition
impl Default for AnimationTransition
Source§fn default() -> AnimationTransition
fn default() -> AnimationTransition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AnimationTransitionwhere
AnimationTransition: Default,
impl<'de> Deserialize<'de> for AnimationTransitionwhere
AnimationTransition: Default,
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 AnimationTransition
impl RefUnwindSafe for AnimationTransition
impl Send for AnimationTransition
impl Sync for AnimationTransition
impl Unpin for AnimationTransition
impl UnsafeUnpin for AnimationTransition
impl UnwindSafe for AnimationTransition
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