import { EventDispatcher } from './EventDispatcher'; import { Object3D, Vector3 } from 'three'; import { Pipe } from './Pipe'; interface IDisposeParams { geometry: boolean; material: boolean; maps: boolean; actions: boolean; viewer: boolean; } export declare class ViewerModule extends EventDispatcher { readonly uiObject: Object3D; readonly isViewer: boolean; readonly data: any; protected readonly disposeObjects: Array; constructor(); /** * Function to get world position of this ViewerModule * @return {Vector3} Global position */ getGlobalPosition(): Vector3; /** * Function to add new mesh to uiObject, to automatize that disposing * @param {Mesh|ViewerModule} object * @param {IDisposeParams} disposeParams What need to be disposed in mesh, when viewer is disposing * @param {boolean} [disposeParams.geometry=true] Need to dispose geometry of the object * @param {boolean} [disposeParams.material=true] Need to dispose material of the object * @param {boolean} [disposeParams.maps=false] Need to dispose maps in the material of the object * @param {boolean} [disposeParams.actions=true] Need to off actions in action controller for current object * @param {boolean} [disposeParams.viewer=true] Need to dispose curent Viewer. * @param {Object3D} parentObject=this.uiObject Where to add object. By default it is uiObject of the ViewerModule * @return {Mesh|ViewerModule} object */ addObject(object: any, disposeParams?: IDisposeParams, parentObject?: Object3D): any; /** * Function to remove mesh from uiObject * @param {Mesh|ViewerModule} object */ removeObject(object: any): void; /** * Function to dispose mesh and remove it from uiObject * @param object * @param disposeParams */ disposeObject(object?: Object3D | ViewerModule, disposeParams?: any): void; /** * Function to update this object using Pipe function. * @param pipe Pipe Pipe function * @return this ViewerModule */ pipe(pipe: Pipe): this; /** * Update function to call in each frame */ update(): void; /** * Automatized dispose function, works with objects, that are added with addObject function */ dispose(): void; } export {};