Function lerpScalar

  • Linear interpolation between 2 values.

    Parameters

    • start: number

      The value to start from.

    • end: number

      The value to move towards.

    • lerpFactor: number = 0.1

      The percentage amount to move. A value between 0 and 1.

    • lock: number = 0.001

      If the distance between from and to is smaller than lock, the return value will snap to end.

    Returns number

    The start value moved with lerpFactor towards the end value.