import { animate, AnimationOptions, Driver, KeyframeOptions, PlaybackOptions } from '@repalash/popmotion';
import { AViewerPluginSync, ThreeViewer } from '../../viewer';
import { IAnimationObject, IAnimSet } from '../../utils';
import { ICamera, ICameraView } from '../../core';
import { animateKeyframes } from '../../utils/animation';
export interface AnimationResult {
    id: string;
    promise: Promise<string>;
    options: AnimationOptions<any>;
    stop: () => void;
    anims: AnimationResult[];
    stopped?: boolean;
    _stop?: () => void;
}
/**
 * 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 _lastPreFrameTime;
    private _updaters;
    private _timelineUpdaters;
    dependencies: never[];
    private _fadeDisabled;
    /**
     * Disable the frame fade plugin while animation is running
     */
    disableFrameFade: boolean;
    autoIncrementTime: boolean;
    private _postFrame;
    private _preFrame;
    readonly defaultDriver: Driver;
    readonly timelineDriver: Driver;
    onAdded(viewer: ThreeViewer): void;
    onRemove(viewer: ThreeViewer): void;
    readonly animations: Record<string, AnimationResult>;
    animate<V>(options1: AnimationOptions<V> & {
        target?: any;
        key?: string;
    }, animateFunc?: typeof animate | typeof animateKeyframes): AnimationResult;
    animateAsync<V>(options: AnimationOptions<V> & {
        target?: any;
        key?: string;
    }, animations?: AnimationResult[]): Promise<string>;
    /**
     * Similar to animate, but specifically for numbers, defaults from 0 to 1. Also calls onUpdate with the delta value.
     * @param options
     */
    animateNumber(options: Omit<PlaybackOptions<number> & KeyframeOptions<number>, 'from' | 'to' | 'onUpdate'> & {
        from?: number;
        to?: number;
        onUpdate?: (value: number, delta: number) => void;
    }): AnimationResult;
    timeout(ms: number, options?: AnimationOptions<number>): AnimationResult;
    animateTargetAsync<T>(target: T, key: keyof T, options: AnimationOptions<T[keyof T]>, animations?: AnimationResult[]): Promise<string>;
    /**
     * @deprecated - use {@link animate} instead
     * @param target
     * @param key
     * @param options
     */
    animateTarget<T>(target: T, key: keyof T, options: AnimationOptions<T[keyof T]>): AnimationResult;
    /**
     * Animate camera to a target view.
     * @param camera
     * @param view
     * @param spherical - use spherical interpolation (default true)
     * @param options - animation options. `normalizeDuration` scales duration based on travel distance
     *   and skips animation if camera is already at target. Default false when duration is provided, true otherwise.
     */
    animateCamera(camera: ICamera, view: ICameraView, spherical?: boolean, options?: Partial<AnimationOptions<any>> & {
        normalizeDuration?: boolean;
    }): AnimationResult | {
        id: string;
        options: AnimationOptions<any>;
        stop: () => void;
        stopped: false;
        _stop: () => void;
        anims: AnimationResult[];
        promise: any;
    };
    animateCameraAsync(camera: ICamera, view: ICameraView, spherical?: boolean, options?: Partial<AnimationOptions<any>> & {
        normalizeDuration?: boolean;
    }, animations?: AnimationResult[]): Promise<any>;
    createAnimationResult(options?: AnimationOptions<any>): {
        id: string;
        options: AnimationOptions<any>;
        stop: () => void;
        stopped: false;
        _stop: () => void;
        anims: AnimationResult[];
        promise: any;
    };
    stopAnimationResult(uuid: string): void;
    animateObject<V>(o: IAnimationObject<V>, delay?: number, canComplete?: boolean, driver?: Driver, delay2?: number): AnimationResult;
    animateSet(anims: IAnimSet, parallel?: boolean, delay1?: number, canComplete?: boolean, driver?: Driver): AnimationResult;
}
//# sourceMappingURL=../../src/plugins/animation/PopmotionPlugin.d.ts.map