@speckle/viewer
Version:
A 3d viewer for Speckle, based on threejs.
19 lines (18 loc) • 852 B
TypeScript
export declare const SETTLING_TIME: number;
export declare const DECAY_MILLISECONDS = 50;
/**
* 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.
*/
export declare class AngleDamper {
private velocity;
private naturalFrequency;
constructor(decayMilliseconds?: number);
setDecayTime(decayMilliseconds: number): void;
protected wrapAngle(angle: number): number;
update(x: number, xGoal: number, timeStepMilliseconds: number, xNormalization: number): number;
}