Type Alias InterpolateOptions

InterpolateOptions: {
    easing: EasingName;
    limits: "clamp" | "wrap" | "ignore";
    transform: ((v: number) => number);
}

Limit What to do if interpolation amount exceeds 0..1 range

  • clamp: lock to A & B (inclusive) Default.
  • wrap: wrap from end to start again
  • ignore: allow return values outside of A..B range

Easing: name of easing function for non-linear interpolation

Transform: name of function to transform amount prior to interpolate.