pub struct Motion { /* private fields */ }Expand description
Retains only properties referenced during the current frame, up to capacity.
Targets are normalized [0,1] effects, not arbitrary geometry.
Implementations§
Source§impl Motion
impl Motion
pub fn new(capacity: usize) -> Self
pub fn begin(&mut self, time: f64, preference: MotionPreference)
Sourcepub fn effect(
&mut self,
id: u64,
property: u8,
target: f32,
initial: f32,
spring: Spring,
) -> f32
pub fn effect( &mut self, id: u64, property: u8, target: f32, initial: f32, spring: Spring, ) -> f32
First encounter initializes at initial; use target for no entrance effect.
Retargeting preserves the sampled presentation and velocity.
pub fn tween( &mut self, id: u64, property: u8, target: f32, initial: f32, enter: TweenSpec, exit: TweenSpec, ) -> f32
pub fn elapsed(&mut self, id: u64, property: u8) -> f64
pub fn pause_clocks(&mut self)
pub fn finish(&mut self)
pub fn is_animating(&self) -> bool
pub fn retained_properties(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Forget for Motion
impl Freeze for Motion
impl Move for Motion
impl RefUnwindSafe for Motion
impl Send for Motion
impl Sync for Motion
impl Unpin for Motion
impl UnsafeUnpin for Motionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<((u64, u8), Track)>: UnsafeUnpin,
PhantomData<((u64, u8), (Tween, u64))>: UnsafeUnpin,
PhantomData<((u64, u8), (f64, u64))>: UnsafeUnpin,
impl UnwindSafe for Motion
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