• Damp, based on Game Programming Gems 4 Chapter 1.10 Return value indicates whether the animation is still running.

    Parameters

    • current: {
          [key: string]: any;
      }

      The object

      • [key: string]: any
    • prop: string

      The key to animate

    • target: number

      To goal value

    • smoothTime: number = 0.25

      Approximate time to reach the target. A smaller value will reach the target faster.

    • delta: number = 0.01

      Frame delta, for refreshrate independence

    • maxSpeed: number = Infinity

      Optionally allows you to clamp the maximum speed. If smoothTime is 0.25s and looks OK going between two close points but not for points far apart as it'll move very rapid, then a maxSpeed of e.g. 1 which will clamp the speed to 1 unit per second, it may now take much longer than smoothTime to reach the target if it is far away.

    • easing: ((amount) => number) = ease.easeLinear

      Easing function

        • (amount): number
        • Parameters

          • amount: number

          Returns number

    • eps: number = 0.001

      End of animation precision

    Returns boolean