pub enum RateFn {
Linear,
Smooth,
ThereAndBack,
EaseIn(Ease),
EaseOut(Ease),
EaseInOut(Ease),
Spring {
stiffness: f32,
damping: f32,
},
Custom(fn(f32) -> f32),
}Expand description
Maps linear progress 0..=1 to eased progress.
Variants§
Linear
No easing.
Smooth
Smootherstep; close to manim’s default smooth.
ThereAndBack
Smooth out to 1 at the midpoint and back to 0.
EaseIn(Ease)
Starts slow.
EaseOut(Ease)
Ends slow.
EaseInOut(Ease)
Starts and ends slow.
Spring
Damped oscillation that overshoots and settles at 1: stiffness is the angular
frequency and damping the decay rate, both per clip (e.g. 20 and 6).
Fields
Custom(fn(f32) -> f32)
Any function with f(0) == 0.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RateFn
impl RefUnwindSafe for RateFn
impl Send for RateFn
impl Sync for RateFn
impl Unpin for RateFn
impl UnsafeUnpin for RateFn
impl UnwindSafe for RateFn
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