Skip to main content

Class: BaseGroundPlugin<TMesh, TEvent>

Plugins.BaseGroundPlugin

Type parameters​

NameType
TMeshextends Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2 = Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2
TEventextends string = ""

Hierarchy​

Implements​

Accessors​

dirty​

• get dirty(): boolean

Returns​

boolean

Implementation of​

IViewerPluginAsync.dirty

Inherited from​

AViewerPlugin.dirty

• set dirty(value): void

Parameters​

NameType
valueboolean

Returns​

void

Implementation of​

IViewerPluginAsync.dirty

Inherited from​

AViewerPlugin.dirty


viewer​

• get viewer(): undefined | ViewerApp

Returns​

undefined | ViewerApp

Inherited from​

AViewerPlugin.viewer


enabled​

• get enabled(): boolean

Returns​

boolean

Overrides​

AViewerPlugin.enabled

• set enabled(value): void

Parameters​

NameType
valueboolean

Returns​

void

Overrides​

AViewerPlugin.enabled


material​

• get material(): undefined | MeshStandardMaterial2<IMaterialEventMap>

Returns​

undefined | MeshStandardMaterial2<IMaterialEventMap>


mesh​

• get mesh(): undefined | IModel<TMesh, IObject3DEventMap>

Returns​

undefined | IModel<TMesh, IObject3DEventMap>


autoAdjustTransform​

• get autoAdjustTransform(): boolean

Returns​

boolean

• set autoAdjustTransform(value): void

Parameters​

NameType
valueboolean

Returns​

void


uiConfig​

• get uiConfig(): UiObjectConfig<any, string>

Returns​

UiObjectConfig<any, string>

Implementation of​

IViewerPluginAsync.uiConfig

Methods​

toJSON​

▸ toJSON(meta?): any

Parameters​

NameType
meta?any

Returns​

any

Implementation of​

IViewerPluginAsync.toJSON

Inherited from​

AViewerPlugin.toJSON


exportState​

▸ exportState(): any

Returns​

any

Inherited from​

AViewerPlugin.exportState


importState​

▸ importState(state): Promise<void>

Parameters​

NameType
stateany

Returns​

Promise<void>

Inherited from​

AViewerPlugin.importState


storeState​

▸ storeState(prefix?, storage?, data?): void

Parameters​

NameType
prefix?string
storage?Storage
data?any

Returns​

void

Implementation of​

IViewerPluginAsync.storeState

Inherited from​

AViewerPlugin.storeState


loadState​

▸ loadState(prefix?, storage?): Promise<void>

Parameters​

NameType
prefix?string
storage?Storage

Returns​

Promise<void>

Implementation of​

IViewerPluginAsync.loadState

Inherited from​

AViewerPlugin.loadState


setGeometry​

▸ setGeometry(g?): void

Parameters​

NameType
g?BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>

Returns​

void


onAdded​

▸ onAdded(viewer): Promise<void>

Parameters​

NameType
viewerViewerApp

Returns​

Promise<void>

Implementation of​

IViewerPluginAsync.onAdded

Overrides​

AViewerPlugin.onAdded


onDispose​

▸ onDispose(viewer): Promise<void>

Parameters​

NameType
viewerViewerApp

Returns​

Promise<void>

Implementation of​

IViewerPluginAsync.onDispose

Overrides​

AViewerPlugin.onDispose


onRemove​

▸ onRemove(viewer): Promise<void>

Parameters​

NameType
viewerViewerApp

Returns​

Promise<void>

Implementation of​

IViewerPluginAsync.onRemove

Overrides​

AViewerPlugin.onRemove


refreshTransform​

▸ refreshTransform(): void

Returns​

void


refreshOptions​

▸ refreshOptions(): void

Returns​

void


setOptions​

▸ setOptions(options): void

Parameters​

NameType
optionsPartial<GroundOptions>

Returns​

void


fromJSON​

▸ fromJSON(data, meta?): null | BaseGroundPlugin<TMesh, TEvent>

Parameters​

NameType
dataany
meta?any

Returns​

null | BaseGroundPlugin<TMesh, TEvent>

Implementation of​

IViewerPluginAsync.fromJSON

Overrides​

AViewerPlugin.fromJSON


_storeKey​

▸ Protected _storeKey(prefix?): string

Parameters​

NameType
prefix?string

Returns​

string

Inherited from​

AViewerPlugin._storeKey


_createMesh​

▸ Protected _createMesh(): Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, Material<MaterialEventMap> | Material<MaterialEventMap>[], Object3DEventMap>

Returns​

Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, Material<MaterialEventMap> | Material<MaterialEventMap>[], Object3DEventMap>


_postFrame​

▸ Protected _postFrame(): void

Returns​

void


_preRender​

▸ Protected _preRender(): void

Returns​

void


_removeMaterial​

▸ Protected _removeMaterial(): void

Returns​

void


_onSceneUpdate​

▸ Protected _onSceneUpdate(event?): void

Parameters​

NameType
event?IEvent<string>

Returns​

void


_refreshTransform​

▸ Protected _refreshTransform(): void

Returns​

void


_refreshMaterial​

▸ Protected _refreshMaterial(): boolean

Returns​

boolean


_extraUiConfig​

▸ Protected _extraUiConfig(): (UiObjectConfig<any, string> | () => UiObjectConfig<any, string> | UiObjectConfig<any, string>[])[]

Returns​

(UiObjectConfig<any, string> | () => UiObjectConfig<any, string> | UiObjectConfig<any, string>[])[]

Properties​

dependencies​

• dependencies: Class<IViewerPlugin<boolean>>[]

Implementation of​

IViewerPluginAsync.dependencies


visible​

• visible: boolean = true


size​

• size: number = 8


yOffset​

• yOffset: number = 0


renderToDepth​

• renderToDepth: boolean = true


tonemapGround​

• tonemapGround: boolean = true


limitCameraAboveGround​

• limitCameraAboveGround: boolean = false


enableRefreshTransform​

• enableRefreshTransform: boolean = true

Extra flag for plugins to disable transform refresh like when animating or dragging


useModelBounds​

• useModelBounds: boolean = false


_dirty​

• Protected _dirty: boolean = false

Inherited from​

AViewerPlugin._dirty


_viewer​

• Protected Optional _viewer: ViewerApp

Inherited from​

AViewerPlugin._viewer


_geometry​

• Protected _geometry: BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>


_material​

• Protected Optional _material: MeshStandardMaterial2<IMaterialEventMap>


_mesh​

• Protected Optional _mesh: TMesh


_options​

• Protected _options: GroundOptions


_manager​

• Protected Optional _manager: AssetManagerPlugin


_uiConfig​

• Protected Optional _uiConfig: UiObjectConfig<any, string>

Constructors​

constructor​

• new BaseGroundPlugin<TMesh, TEvent>(options?)

Type parameters​

NameType
TMeshextends Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, MeshStandardMaterial<MaterialEventMap>, Object3DEventMap> | Reflector2 = Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, MeshStandardMaterial<MaterialEventMap>, Object3DEventMap> | Reflector2
TEventextends string = ""

Parameters​

NameType
optionsPartial<GroundOptions>

Overrides​

AViewerPlugin.constructor