The Damper class is a generic second-order critically damped system that does one linear step of the desired length of time. The only parameter is DECAY_MILLISECONDS. This common parameter makes all states converge at the same rate regardless of scale. xNormalization is a number to provide the rough scale of x, such that NIL_SPEED clamping also happens at roughly the same convergence for all states.

Taken from Google model-viewer.

https://github.com/google/model-viewer/blob/ec527bc1d0e1bcb4421fa192a7e62bbc5764db91/packages/model-viewer/src/three-components/Damper.ts#L1

Hierarchy

  • Damper

Constructors

  • Parameters

    • decayMilliseconds: number = Damper.DECAY_MILLISECONDS

    Returns Damper

Properties

naturalFrequency: number = 0
velocity: number = 0
DECAY_MILLISECONDS: 50 = 50
MIN_DECAY_MILLISECONDS: 0.001 = 0.001
SETTLING_TIME: 10000 = 10000

Methods

  • Parameters

    • decayMilliseconds: number

    Returns void

  • Parameters

    • v: number
    • vGoal: number
    • timeStepMilliseconds: number
    • xNormalization: number

    Returns number

Generated using TypeDoc