import { ISerializedConfig, IViewerEvent, ThreeViewer, IViewerEventTypes } from './ThreeViewer'; import { EventDispatcher } from 'three'; import { PartialRecord, SerializationMetaType } from '../utils'; import { IViewerPlugin, IViewerPluginAsync } from './IViewerPlugin'; import { UiObjectConfig } from 'uiconfig.js'; export interface AViewerPluginEventMap { serialize: { data: ISerializedConfig; }; deserialize: { data: ISerializedConfig; meta?: SerializationMetaType; }; } /** * Base Class for Viewer Plugins * @category Viewer */ export declare abstract class AViewerPlugin extends EventDispatcher implements IViewerPlugin { ['constructor']: typeof AViewerPlugin; static readonly PluginType: string; static readonly OldPluginType?: string; protected _dirty: boolean; abstract isViewerPluginSync: IsSync extends true ? true : false; uiConfig?: UiObjectConfig; protected _viewer?: TViewer; abstract enabled: boolean; abstract onAdded(viewer: TViewer): IsSync extends false ? Promise : void; abstract onRemove(viewer: TViewer): IsSync extends false ? Promise : void; dispose(): void; toJSON(meta?: SerializationMetaType): ISerializedConfig; fromJSON(data: ISerializedConfig, meta?: SerializationMetaType): this | null | Promise; protected _storeKey(prefix?: string): string; exportState(): ISerializedConfig | Record; importState(state: any): Promise; protected _viewerListeners: PartialRecord void>; protected _onViewerEvent: (e: IViewerEvent) => IViewerEvent; private _disabledBy; disable: (key: any, setDirty?: boolean) => void; enable: (key: any, setDirty?: boolean) => void; isDisabled: () => boolean; setDirty?(...args: any[]): any; get dirty(): boolean; set dirty(value: boolean); } /** * Base Class for Sync Viewer Plugins * @category Viewer */ export declare abstract class AViewerPluginSync extends AViewerPlugin { ['constructor']: (typeof AViewerPluginSync) & (typeof AViewerPlugin); isViewerPluginSync: true; onAdded(viewer: TViewer): void; onRemove(viewer: TViewer): void; } /** * Base Class for Async Viewer Plugins * @category Viewer */ export declare abstract class AViewerPluginAsync extends AViewerPlugin implements IViewerPluginAsync { ['constructor']: (typeof AViewerPluginAsync) & (typeof AViewerPlugin); isViewerPluginSync: false; onAdded(viewer: TViewer): Promise; onRemove(viewer: TViewer): Promise; } //# sourceMappingURL=../src/viewer/AViewerPlugin.d.ts.map