Canvas Toolkit
← Class index

CEasingCurve

Animation

Clamps input time to [0, 1]. Elastic output may exceed that interval.

Module animation/CEasingCurve.js. This class is available through the browser modules in the download.

Declared members

constructor(curve?: CEasingCurveType | CEasingCurve);

Copies all settings when constructed from another curve.

type(): CEasingCurveType;
setType(type: CEasingCurveType): void;
oscillations(): number;

Oscillation frequency over the full duration; zero disables oscillation.

setOscillations(oscillations: number): void;
damping(): number;

Exponential decay over the duration. Larger values settle more quickly.

setDamping(damping: number): void;
valueForProgress(progress: number): number;