pub enum AnimatedValue {
Integer {
from: i32,
to: i32,
},
Float {
from: f32,
to: f32,
},
Color {
from: [u8; 4],
to: [u8; 4],
},
Position {
from: (f32, f32),
to: (f32, f32),
},
Scale {
from: (f32, f32),
to: (f32, f32),
},
}Expand description
Animated property value
Variants§
Integer
Integer value animation
Float
Float value animation
Color
Color animation (RGBA)
Position
Position animation
Scale
Scale animation
Implementations§
Source§impl AnimatedValue
impl AnimatedValue
Sourcepub fn interpolate(&self, progress: f32) -> AnimatedResult
pub fn interpolate(&self, progress: f32) -> AnimatedResult
Interpolate value at given progress
Trait Implementations§
Source§impl Clone for AnimatedValue
impl Clone for AnimatedValue
Source§fn clone(&self) -> AnimatedValue
fn clone(&self) -> AnimatedValue
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 moreAuto Trait Implementations§
impl Freeze for AnimatedValue
impl RefUnwindSafe for AnimatedValue
impl Send for AnimatedValue
impl Sync for AnimatedValue
impl Unpin for AnimatedValue
impl UnsafeUnpin for AnimatedValue
impl UnwindSafe for AnimatedValue
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more