bevy_math::curve::easing

Trait Ease

source
pub trait Ease: Sized {
    // Required method
    fn interpolating_curve_unbounded(start: Self, end: Self) -> impl Curve<Self>;
}
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]

Object Safety§

This trait is not object safe.

Implementors§