UNPKG

1.19 kBTypeScriptView Raw
1import { Position } from './types/anim.js';
2import { CAnimControl, CAnimation } from './module/canimctrl.js';
3/** Control object for animation. */
4export declare class AnimControl {
5 private _cControl;
6 constructor(cControl: CAnimControl);
7 /** Returns a reference to the actual animation for further reuse. */
8 store(): CAnimation;
9 /** Seeks the animation to the position specified by time or progress
10 percentage. Seeking the animation to the end position while the animation
11 is paused will not trigger the animation complete promise to resolve. */
12 seek(value: Position): this;
13 /** Playback speed of the animation. It is 1.0 by default.
14 Negative values are considered 0. */
15 set speed(value: number);
16 /** Pauses the controlled animation. */
17 pause(): this;
18 /** Plays/resumes playing of the controlled animation. */
19 play(): this;
20 /** Stops the current animation seeking it back to its start position. */
21 stop(): this;
22 /** Cancels the animation, will reject the animation promise. */
23 cancel(): this;
24 /** Changes the direction of the controlled animation. */
25 reverse(): this;
26 private _animControl;
27}