pub struct ActiveAnim {
pub class: AnimClass,
pub translate_x: AnimChannel,
pub translate_y: AnimChannel,
pub scale_x: AnimChannel,
pub scale_y: AnimChannel,
pub opacity: AnimChannel,
}Expand description
One in-flight animation: the FLIP channels plus opacity.
Fields§
§class: AnimClassWhat kind of presence change started this.
translate_x: AnimChannelHorizontal offset channel.
translate_y: AnimChannelVertical offset channel.
scale_x: AnimChannelHorizontal scale channel.
scale_y: AnimChannelVertical scale channel.
opacity: AnimChannelOpacity channel.
Implementations§
Source§impl ActiveAnim
impl ActiveAnim
Sourcepub const fn move_from_flip(
flip: FlipTransform,
mode: InterpolationMode,
) -> Self
pub const fn move_from_flip( flip: FlipTransform, mode: InterpolationMode, ) -> Self
A move: start at the FLIP inversion, animate to identity.
Sourcepub const fn enter_slide(
from_x: f32,
from_y: f32,
mode: InterpolationMode,
) -> Self
pub const fn enter_slide( from_x: f32, from_y: f32, mode: InterpolationMode, ) -> Self
An enter: slide in from (from_x, from_y) to identity, full opacity and size.
Sourcepub fn retarget_presence(&mut self, class: AnimClass, to_x: f32, to_y: f32)
pub fn retarget_presence(&mut self, class: AnimClass, to_x: f32, to_y: f32)
An exit: slide out from identity to (to_x, to_y), full opacity and size.
Only visible with exit-retention.
Reversing a presence animation in flight will retarget from the current values with velocity preserved.
pub const fn exit_slide(to_x: f32, to_y: f32, mode: InterpolationMode) -> Self
Sourcepub const fn is_finished(&self) -> bool
pub const fn is_finished(&self) -> bool
True once every channel has arrived.
Sourcepub const fn current_transform(&self) -> FlipTransform
pub const fn current_transform(&self) -> FlipTransform
The transform to write this frame.
Sourcepub const fn current_opacity(&self) -> f32
pub const fn current_opacity(&self) -> f32
The opacity to write this frame.
Sourcepub fn retarget_move(&mut self, flip: FlipTransform)
pub fn retarget_move(&mut self, flip: FlipTransform)
Re-aim at a new FLIP target, preserving position and velocity.
Trait Implementations§
Source§impl Clone for ActiveAnim
impl Clone for ActiveAnim
Source§fn clone(&self) -> ActiveAnim
fn clone(&self) -> ActiveAnim
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 moreimpl Copy for ActiveAnim
Source§impl Debug for ActiveAnim
impl Debug for ActiveAnim
Source§impl PartialEq for ActiveAnim
impl PartialEq for ActiveAnim
impl StructuralPartialEq for ActiveAnim
Auto Trait Implementations§
impl Freeze for ActiveAnim
impl RefUnwindSafe for ActiveAnim
impl Send for ActiveAnim
impl Sync for ActiveAnim
impl Unpin for ActiveAnim
impl UnsafeUnpin for ActiveAnim
impl UnwindSafe for ActiveAnim
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