UNPKG

@lightningjs/renderer

Version:
28 lines (27 loc) 1.08 kB
import type { AnimationControllerState, IAnimationController } from '../../common/IAnimationController.js'; import type { AnimationManager } from './AnimationManager.js'; import type { CoreAnimation } from './CoreAnimation.js'; import { EventEmitter } from '../../common/EventEmitter.js'; export declare class CoreAnimationController extends EventEmitter implements IAnimationController { private manager; private animation; stoppedPromise: Promise<void>; /** * If this is null, then the animation is in a finished / stopped state. */ stoppedResolve: (() => void) | null; state: AnimationControllerState; constructor(manager: AnimationManager, animation: CoreAnimation); start(): IAnimationController; stop(): IAnimationController; pause(): IAnimationController; restore(): IAnimationController; waitUntilStopped(): Promise<void>; private registerAnimation; private unregisterAnimation; private makeStoppedPromise; private onDestroy; private onFinished; private onAnimating; private onTick; }