import { ContextManager, PlayOptions, Event, Stream, Observable } from '@zcomponent/core'; import { Texture, TextureConstructorProps } from './Texture'; import { ThreeAnimatedLottieTexture } from '../../internal/loaders/LottieLoader'; /** * The properties for constructing a Lottie texture. */ export interface LottieTextureConstructorProps extends TextureConstructorProps { /** * The Lottie animation JSON file. * @zprop * @zvalues files *.json */ source: string; /** * Whether the animation should autoplay * @zprop * @zdefault false */ autoplay: boolean; } /** * Create a texture from a Lottie animation to apply to a surface. * * Root element: [THREE.Texture](https://threejs.org/docs/index.html#api/en/textures/Texture) * @zcomponent * @zgroup Texture * @zicon animation * @ztag three/Texture/LottieTexture * @zparents three/Material/** * @zstream */ export declare class LottieTexture extends Texture implements Stream { protected constructorProps: LottieTextureConstructorProps; /** * @zui */ onEnded: Event<[LottieTexture]>; /** * @zui */ onPause: Event<[LottieTexture]>; /** * @zui */ onPlay: Event<[LottieTexture]>; /** * Whether the animation should loop * @zprop * @zgroup Play Settings * @zgrouppriority 20 * @zdefault false */ loop: Observable; private lottieLoader; loaded: Promise; constructor(contextManager: ContextManager, constructorProps: LottieTextureConstructorProps); private _onLoopChange; private _load; /** * Start playing the animation * @zprop * @zui */ play(opts?: PlayOptions): void; /** * Pause the animation * @zprop * @zui */ pause(): void; /** * Stop the animation and return to start * @zprop * @zui */ stop(): void; /** * Seek to a specific millisecond in the animation. * @zprop * @zui */ seek(/** @ztype time-milliseconds */ t: number): void; length(): number; dispose(): never; }