Interface IViewerPlugin<TViewer, IsSync>

Interface for Viewer Plugins

interface IViewerPlugin<
    TViewer extends ThreeViewer = ThreeViewer,
    IsSync extends boolean = boolean,
> {
    constructor: { OldPluginType?: string; PluginType: string };
    dependencies?: Class<IViewerPlugin<TViewer, IsSync>>[];
    dirty?: boolean;
    loadState?: (prefix?: string, storage?: Storage) => Promise<void>;
    serializeWithViewer?: boolean;
    storeState?: (prefix?: string, storage?: Storage, data?: any) => void;
    onAdded(viewer: TViewer): IsSync extends false ? Promise<void> : void;
    onRemove(viewer: TViewer): IsSync extends false ? Promise<void> : void;
    [key: string]: any;
}

Type Parameters

Hierarchy (View Summary)

Implemented by

Indexable

  • [key: string]: any

Properties

constructor: { OldPluginType?: string; PluginType: string }

The initial value of Object.prototype.constructor is the standard built-in Object constructor.

dependencies?: Class<IViewerPlugin<TViewer, IsSync>>[]
dirty?: boolean
loadState?: (prefix?: string, storage?: Storage) => Promise<void>
serializeWithViewer?: boolean
storeState?: (prefix?: string, storage?: Storage, data?: any) => void

Methods