animatable-js
Version:
This package allows easy and light implementation of linear or curved animation in javascript. (Especially suitable in a development environment on web components or canvas.)
23 lines (22 loc) • 650 B
TypeScript
import { TickerCallback } from "./types";
/**
* This class is essential to implementing animation.
*
* Used to define a elapsed duration between a previous frame and
* the current frame when a frame updated.
*
* Used by `Animation` class.
*/
export declare class Ticker {
callback: TickerCallback;
/**
* When an instance is created by this constructor, a related task
* is performed immediately.
*
* See also:
* @important A dispose() must be called after the ticker is used.
*/
constructor(callback: TickerCallback);
/** Cancels the registered animation frame listener. */
dispose(): void;
}