Strata - v1.4.10
    Preparing search index...

    Function damp

    • 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

      • prop: string

        The key to animate

      • target: number

        To goal value

      • OptionalsmoothTime: number

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

      • Optionaldelta: number

        Frame delta, for refreshrate independence

      • OptionalmaxSpeed: number

        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.

      • Optionaleasing: (t: number) => number

        Easing function

      • Optionaleps: number

        End of animation precision

      Returns boolean