Class ScalarDamper

A scalar damper that retains velocity.

Based on Game Programming Gems 4 Chapter 1.10.

Hierarchy

  • ScalarDamper

Constructors

Methods

  • Smooth interpolation with exponential velocity gain/decay.

    Parameters

    Returns number

    The interpolated value.

  • Calculates the exponentional factor which can be reused for interpolations during the same frame.

    Parameters

    Returns number

    The exponentional interpolation factor.

  • Calculates the Omega coefficient which can be reused for interpolations during the same frame.

    Parameters

    • lambda: number

      A smoothing factor.

    Returns number

    Omega.

Generated using TypeDoc