import { Object3D, Vector3 } from 'three';
import { Easing } from '@repalash/popmotion';
import { AViewerPluginEventMap, AViewerPluginSync, ThreeViewer } from '../../viewer';
import { UiObjectConfig } from 'uiconfig.js';
import { EasingFunctionType } from '../../utils';
import { CameraView, ICamera, ICameraView, IGeometry, IMaterial, ITexture } from '../../core';
import { PopmotionPlugin } from './PopmotionPlugin';
export interface CameraViewPluginOptions {
    duration?: number;
    ease?: EasingFunctionType;
    interpolateMode?: 'spherical' | 'linear';
}
export interface CameraViewPluginEventMap extends AViewerPluginEventMap {
    viewChange: {
        view: CameraView;
    };
    startViewChange: {
        view: CameraView;
    };
    viewAdd: {
        view: CameraView;
    };
    viewDelete: {
        view: CameraView;
    };
    viewUpdate: {
        view: CameraView;
    };
    update: {
        key?: string;
    };
}
/**
 * Camera View Plugin
 *
 * Provides API to save, interact and animate and loop between with multiple camera states/views using the {@link PopmotionPlugin}.
 *
 */
export declare class CameraViewPlugin extends AViewerPluginSync<CameraViewPluginEventMap> {
    static readonly PluginType = "CameraViews";
    enabled: boolean;
    constructor(options?: CameraViewPluginOptions);
    private _cameraViews;
    get cameraViews(): CameraView[];
    get camViews(): CameraView[];
    viewLooping: boolean;
    /**
     * Pauses time between view changes when animating all views or looping.
     */
    viewPauseTime: number;
    /**
     * {@link EasingFunctions}
     */
    animEase: EasingFunctionType;
    animDuration: number;
    interpolateMode: 'spherical' | 'linear' | 'spline';
    rotationOffset: number;
    private _animating;
    get animating(): boolean;
    dependencies: (typeof PopmotionPlugin)[];
    onAdded(viewer: ThreeViewer): void;
    onRemove(viewer: ThreeViewer): void;
    resetToFirstView(duration?: number): Promise<void>;
    addCurrentView(): Promise<CameraView | undefined>;
    addView(view: CameraView, force?: boolean): void;
    deleteView(view: CameraView, force?: boolean): void;
    getView(camera?: ICamera, worldSpace?: boolean, view?: CameraView): CameraView;
    setView(view: ICameraView, camera?: ICamera): void;
    private _currentView;
    focusNext: (wrap?: boolean) => void;
    focusPrevious: (wrap?: boolean) => void;
    private _popAnimations;
    animateToView(_view: CameraView | number | string, duration?: number, easing?: Easing | EasingFunctionType, camera?: ICamera, throwOnStop?: boolean, normalizeDuration?: boolean): Promise<void>;
    animateAllViews(): Promise<void>;
    stopAllAnimations(): Promise<void>;
    fromJSON(data: any, meta?: any): this | null;
    setDirty(ops?: any): any;
    animateToObject(selected?: Object3D, distanceMultiplier?: number, duration?: number, ease?: Easing | EasingFunctionType, distanceBounds?: {
        min: number;
        max: number;
    }): Promise<void>;
    private _resolveSelectedObjects;
    /**
     * Animates the camera to fit the selected objects in the viewport.
     * When `duration` is 0, the view is set instantly via {@link ICamera.fitObject}.
     * Accepts Object3D, materials, textures, or geometries (resolved to their applied meshes).
     * @param selected - objects to fit. Falls back to the scene model root.
     * @param distanceMultiplier - padding multiplier on the fitting distance (default 1.5)
     * @param duration - animation duration in ms. Pass 0 for instant. Defaults to animDuration.
     * @param ease - easing function or name
     * @param distanceBounds - min/max clamp on the final distance
     */
    animateToFitObject(selected?: Object3D | Object3D[] | IMaterial | IMaterial[] | ITexture | ITexture[] | IGeometry | IGeometry[], distanceMultiplier?: number, duration?: number, ease?: Easing | EasingFunctionType, distanceBounds?: {
        min: number;
        max: number;
    }): Promise<void>;
    /**
     *
     * @param distanceFromTarget - in world units
     * @param center - target (center) of the view in world coordinates
     * @param duration - in milliseconds
     * @param ease
     */
    animateToTarget(distanceFromTarget: number, center: Vector3, duration?: number, ease?: Easing | EasingFunctionType): Promise<void>;
    uiConfig: UiObjectConfig;
    get animationLooping(): boolean;
    private _viewQueue;
    private _animationLooping;
    private _infiniteLooping;
    private _animationLoop;
    protected _viewSetView: ({ view, camera }: {
        view?: CameraView;
        camera?: ICamera;
    }) => void;
    protected _viewUpdateView: ({ view, camera }: {
        view: CameraView;
        camera?: ICamera;
    }) => void;
    protected _viewDeleteView: ({ view }: {
        view: CameraView;
    }) => void;
    protected _viewAnimateView: ({ view, camera, duration, easing, throwOnStop }: {
        view: CameraView;
        camera?: ICamera;
        duration?: number;
        easing?: Easing | EasingFunctionType;
        throwOnStop?: boolean;
    }) => Promise<void>;
    protected _viewUpdated: (e: {
        target: ICameraView;
        key?: string;
    }) => Promise<void>;
    /**
     * @deprecated - renamed to {@link getView} or {@link ICamera.getView}
     * @param camera
     * @param worldSpace
     */
    getCurrentCameraView(camera?: ICamera, worldSpace?: boolean): CameraView;
    /**
     * @deprecated - renamed to {@link setView} or {@link ICamera.setView}
     * @param view
     */
    setCurrentCameraView(view: CameraView): void;
    /**
     * @deprecated - use {@link animateToView} instead
     * @param view
     */
    focusView(view: CameraView): Promise<void>;
    private _lastAnimTime;
    protected _postFrame(): true | undefined;
}
//# sourceMappingURL=../../src/plugins/animation/CameraViewPlugin.d.ts.map