UNPKG

threepipe

Version:

A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.

57 lines 2.22 kB
import { Driver } from 'popmotion/lib/animations/types'; import { AnimationOptions } from 'popmotion'; import { AViewerPluginSync, ThreeViewer } from '../../viewer'; import { ICamera, ICameraView } from '../../core'; export interface AnimationResult { id: string; promise: Promise<string>; options: AnimationOptions<any>; stop: () => void; _stop?: () => void; targetRef?: { target: any; key: string; }; } /** * Popmotion plugin * * Provides animation capabilities to the viewer using the popmotion library: https://popmotion.io/ * * Overrides the driver in popmotion to sync with the viewer and provide ways to keep track and stop animations. * * @category Plugins */ export declare class PopmotionPlugin extends AViewerPluginSync<''> { static readonly PluginType = "PopmotionPlugin"; enabled: boolean; toJSON: any; fromJSON: any; constructor(enabled?: boolean); private _lastFrameTime; private _updaters; dependencies: never[]; private _fadeDisabled; /** * Disable the frame fade plugin while animation is running */ disableFrameFade: boolean; private _postFrame; readonly defaultDriver: Driver; onAdded(viewer: ThreeViewer): void; onRemove(viewer: ThreeViewer): void; readonly animations: Record<string, AnimationResult>; animateTarget<T>(target: T, key: keyof T, options: AnimationOptions<T[keyof T]>): AnimationResult; animate<V>(options1: AnimationOptions<V> & { target?: any; key?: string; }): AnimationResult; animateAsync<V>(options: AnimationOptions<V> & { target?: any; key?: string; }, animations?: AnimationResult[]): Promise<string>; animateTargetAsync<T>(target: T, key: keyof T, options: AnimationOptions<T[keyof T]>, animations?: AnimationResult[]): Promise<string>; animateCamera(camera: ICamera, view: ICameraView, spherical?: boolean, options?: Partial<AnimationOptions<any>>): AnimationResult; animateCameraAsync(camera: ICamera, view: ICameraView, spherical?: boolean, options?: Partial<AnimationOptions<any>>, animations?: AnimationResult[]): Promise<string>; } //# sourceMappingURL=PopmotionPlugin.d.ts.map