Function easing

  • Calculates easing progress using a specified easing function, bezier curve, or custom easing function.

    Parameters

    • progress: number

      The current progress value (between 0 and 1).

    • Optional easingType: TEasingType

      The easing type to apply. It can be a predefined easing function, a bezier array, or a custom easing function. Defaults to the global app's easing settings if available.

    Returns number

    Example

    easing(0.35, EaseInBounce); // => 0.167
    easing(0.35, [.25, .1, .25, 1]); // => 0.604
    easing(0.35, (value) => Math.sin(Math.PI * 0.5 * value)); // => 0.522