import type { IAnimation, PointLike } from '@antv/g-lite'; import { Canvas, DisplayObject, Group } from '@antv/g-lite'; import type { CustomElementOption, ParseContext } from './parser'; /** * Provides some control methods like: * - play * - pause * - stop * - goToAndStop * - goToAndPlay * @see https://github.com/airbnb/lottie-web/blob/master/player/js/animation/AnimationItem.js */ export declare class LottieAnimation { private width; private height; private elements; private context; constructor(width: number, height: number, elements: CustomElementOption[], context: ParseContext); private displayObjects; private keyframeAnimationMap; private displayObjectElementMap; private animations; private generateTransform; private buildHierachy; getAnimations(): IAnimation[]; /** * Returns the animation duration in seconds or frames. * @see https://github.com/airbnb/lottie-web#getdurationinframes */ getDuration(inFrames?: boolean): number; /** * Returns the animation frame rate (frames / second). */ fps(): number; private isSameKeyframeOptions; private isSameKeyframes; private generatePathFromShape; /** * render Lottie Group to canvas or a mounted display object */ render(canvasOrDisplayObject: Canvas | DisplayObject): Group; private formatKeyframes; /** * Destroy all internal displayobjects. */ destroy(): void; /** * Return the size of this animation. * @param outputSize - If provided, the size will be copied into here as width, height. */ size(outputSize?: PointLike): { width: number; height: number; }; /** * Bodymovin version */ version(): string; private isPaused; play(): void; /** * Can contain 2 numeric values that will be used as first and last frame of the animation. * @see https://github.com/airbnb/lottie-web#playsegmentssegments-forceflag */ playSegments(segments: [number, number]): void; pause(): void; /** * */ togglePause(): void; /** * Goto and stop at a specific time(in seconds) or frame. * Split goToAndStop/Play into goTo & stop/play * @see https://github.com/airbnb/lottie-web */ goTo(value: number, isFrame?: boolean): void; /** * @see https://github.com/airbnb/lottie-web#stop */ stop(): void; /** * 1 is normal speed. * @see https://github.com/airbnb/lottie-web#setspeedspeed */ setSpeed(speed: number): void; private direction; /** * 1 is forward, -1 is reverse. * @see https://github.com/airbnb/lottie-web#setdirectiondirection */ setDirection(direction: 1 | -1): void; } //# sourceMappingURL=LottieAnimation.d.ts.map