#[repr(C)]pub struct AnimationOptions {
pub curve: AnimationCurve,
pub duration: f32,
pub loop_count: u32,
pub delay: f32,
pub smoothing: f32,
}
Fields§
§curve: AnimationCurve
§duration: f32
Specifies the duration (in seconds) of the animation.
loop_count: u32
Specifies the amount of times the animation will loop before ending. A loop count of 0 is undefined.
delay: f32
Specifies the delay (in seconds) until the animation starts.
smoothing: f32
Specifies a smoothing constant, where 0 means no smoothing and >0 means more smoothing (will take longer time to reach the target). Can be handy to get smooth animation of cameras and other things without adding many keyframes and will also smoothen discontinuities when animations are cancelled. Defaults to 0 (no smoothing).
Trait Implementations§
Source§impl CheckedBitPattern for AnimationOptions
impl CheckedBitPattern for AnimationOptions
Source§type Bits = AnimationOptionsBits
type Bits = AnimationOptionsBits
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(bits: &AnimationOptionsBits) -> bool
fn is_valid_bit_pattern(bits: &AnimationOptionsBits) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl Clone for AnimationOptions
impl Clone for AnimationOptions
Source§fn clone(&self) -> AnimationOptions
fn clone(&self) -> AnimationOptions
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 moreSource§impl Debug for AnimationOptions
impl Debug for AnimationOptions
impl Copy for AnimationOptions
impl NoUninit for AnimationOptions
Auto Trait Implementations§
impl Freeze for AnimationOptions
impl RefUnwindSafe for AnimationOptions
impl Send for AnimationOptions
impl Sync for AnimationOptions
impl Unpin for AnimationOptions
impl UnwindSafe for AnimationOptions
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