bevy_math::curve::easing

Trait Ease

Source
pub trait Ease: Sized {
    // Required method
    fn interpolating_curve_unbounded(start: Self, end: Self) -> impl Curve<Self>;
}
Available on crate feature curve only.
Expand description

A type whose values can be eased between.

This requires the construction of an interpolation curve that actually extends beyond the curve segment that connects two values, because an easing curve may extrapolate before the starting value and after the ending value. This is especially common in easing functions that mimic elastic or springlike behavior.

Required Methods§

Source

fn interpolating_curve_unbounded(start: Self, end: Self) -> impl Curve<Self>

Given start and end values, produce a curve with unlimited domain that:

  • takes a value equivalent to start at t = 0
  • takes a value equivalent to end at t = 1
  • has constant speed everywhere, including outside of [0, 1]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§