fn ease(
        start: Option<Self>,
        end: Self,
        ease_function: impl Into<EaseMethod>,
        easing_type: EasingType,
    ) -> EasingComponent<Self> {
        #[cfg(feature = "ease_handle")]
        let mut rng = rand::thread_rng();

        EasingComponent {
            start: start.map(EaseValue),
            end: EaseValue(end),
            ease_function: ease_function.into(),
            timer: match easing_type {
                EasingType::Once { duration } => Timer::new(duration, false),
                EasingType::Loop { duration, .. } => Timer::new(duration, false),
                EasingType::PingPong { duration, .. } => Timer::new(duration, false),
            },
            state: EasingState::Play,
            paused: false,
            easing_type,
            direction: 1,
        }
    }
/// Create a new easing. If no start is provided, it will try to use the current value of the component for the target entity
Create a new easing. If no start is provided, it will try to use the current value of the component for the target entity
Create a new easing . If no start is provided it will try to use the current value of the component for the target entity
fn ease(
        start: Option<Self>,
        end: Self,
        ease_function: impl Into<EaseMethod>,
        easing_type: EasingType,
    ) -> EasingComponent<Self> {
        #[cfg(feature = "ease_handle")]
        let mut rng = rand::thread_rng();
        EasingComponent {
            start: start.map(EaseValue),
            end: EaseValue(end),
            ease_function: ease_function.into(),
            timer: match easing_type {
                EasingType::Once { duration } => Timer::new(duration, false),
                EasingType::Loop { duration, .. } => Timer::new(duration, false),
                EasingType::PingPong { duration, .. } => Timer::new(duration, false),
            },
            state: EasingState::Play,
            paused: false,
            easing_type,
            direction: 1,
        }
    }
fn ease ( start : Option < Self > , end : Self , ease_function : impl Into < EaseMethod > , easing_type : EasingType , ) -> EasingComponent < Self > { # [ cfg ( feature " " ) ] let mut rng = rand :: thread_rng ( ) ; EasingComponent { start : start . map ( EaseValue ) , end : EaseValue ( end ) , ease_function : ease_function . into ( ) , timer : match easing_type { EasingType :: Once { duration } => Timer :: new ( duration , false ) , EasingType :: Loop { duration , .. } => Timer :: new ( duration , false ) , EasingType :: PingPong { duration , .. } => Timer :: new ( duration , false ) , } , state : EasingState :: Play , paused : false , easing_type , direction : 1 , } }
Create a new easing.
Create a new easing .
start
Option<Self>
end
Self
ease_function
impl Into<EaseMethod>
easing_type
EasingType