pub trait CustomComponentEase: Sized {
    // Provided methods
    fn ease(
        start: Option<Self>,
        end: Self,
        ease_function: impl Into<EaseMethod>,
        easing_type: EasingType
    ) -> EasingComponent<Self> { ... }
    fn ease_to(
        self,
        target: Self,
        ease_function: impl Into<EaseMethod>,
        easing_type: EasingType
    ) -> EasingComponent<Self> { ... }
}
Expand description

Trait to mark custom component that can be eased. It will be automatically implemented if the custom component implement Lerp

Provided Methods§

source

fn ease( start: Option<Self>, end: Self, ease_function: impl Into<EaseMethod>, easing_type: EasingType ) -> EasingComponent<Self>

Create a new easing. If no start is provided, it will try to use the current value of the component for the target entity

source

fn ease_to( self, target: Self, ease_function: impl Into<EaseMethod>, easing_type: EasingType ) -> EasingComponent<Self>

Create a new easing with the current component value as a starting point

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> CustomComponentEase for T
where T: Lerp<Scalar = f32>,