Skip to main content

Class: GroundPlugin<TMesh>

Plugins.GroundPlugin

Type parameters

NameType
TMeshextends Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2 = Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2

Hierarchy

Implements

Properties

PluginType

Static Readonly PluginType: "Ground"

Defined in

webgi/src/plugins/GroundPlugin.ts:32


dependencies

dependencies: Class<IViewerPlugin<IViewerApp>>[]

Implementation of

IViewerPlugin.dependencies

Inherited from

BaseGroundPlugin.dependencies

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:50


visible

visible: boolean = true

Inherited from

BaseGroundPlugin.visible

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:75


size

size: number = 8

Inherited from

BaseGroundPlugin.size

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:78


yOffset

yOffset: number = 0

Inherited from

BaseGroundPlugin.yOffset

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:81


renderToDepth

renderToDepth: boolean = true

Inherited from

BaseGroundPlugin.renderToDepth

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:84


tonemapGround

tonemapGround: boolean = true

Inherited from

BaseGroundPlugin.tonemapGround

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:87


limitCameraAboveGround

limitCameraAboveGround: boolean = false

Inherited from

BaseGroundPlugin.limitCameraAboveGround

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:90


bakedShadows

bakedShadows: boolean = true

Defined in

webgi/src/plugins/GroundPlugin.ts:35


groundReflection

groundReflection: boolean = false

Defined in

webgi/src/plugins/GroundPlugin.ts:37


physicalReflections

physicalReflections: boolean = false

Defined in

webgi/src/plugins/GroundPlugin.ts:39


_dirty

Protected _dirty: boolean = false

Inherited from

BaseGroundPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:25


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

BaseGroundPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:29


_geometry

Protected _geometry: BufferGeometry

Inherited from

BaseGroundPlugin._geometry

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:39


_material

Protected Optional _material: MeshStandardMaterial2

Inherited from

BaseGroundPlugin._material

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:42


_mesh

Protected Optional _mesh: TMesh

Inherited from

BaseGroundPlugin._mesh

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:45


_options

Protected _options: GroundOptions

Inherited from

BaseGroundPlugin._options

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:46


_manager

Protected Optional _manager: AssetManagerPlugin

Inherited from

BaseGroundPlugin._manager

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:47


_uiConfig

Protected Optional _uiConfig: UiObjectConfig<any, string>

Inherited from

BaseGroundPlugin._uiConfig

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:315

Accessors

dirty

get dirty(): boolean

Returns

boolean

Implementation of

IViewerPlugin.dirty

Inherited from

BaseGroundPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:18

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

IViewerPlugin.dirty

Inherited from

BaseGroundPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:22


enabled

get enabled(): boolean

Returns

boolean

Inherited from

BaseGroundPlugin.enabled

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:20

set enabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

BaseGroundPlugin.enabled

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:24


material

get material(): undefined | MeshStandardMaterial2

Returns

undefined | MeshStandardMaterial2

Inherited from

BaseGroundPlugin.material

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:28


mesh

get mesh(): undefined | IModel<TMesh>

Returns

undefined | IModel<TMesh>

Inherited from

BaseGroundPlugin.mesh

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:32


uiConfig

get uiConfig(): UiObjectConfig<any, string>

Returns

UiObjectConfig<any, string>

Implementation of

IViewerPlugin.uiConfig

Inherited from

BaseGroundPlugin.uiConfig

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:323


shadowBaker

get shadowBaker(): undefined | ShadowMapBaker

Returns

undefined | ShadowMapBaker

Defined in

webgi/src/plugins/GroundPlugin.ts:25

Methods

toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Implementation of

IViewerPlugin.toJSON

Inherited from

BaseGroundPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:47


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Implementation of

IViewerPlugin.addEventListener

Inherited from

BaseGroundPlugin.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

boolean

Implementation of

IViewerPlugin.hasEventListener

Inherited from

BaseGroundPlugin.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Implementation of

IViewerPlugin.removeEventListener

Inherited from

BaseGroundPlugin.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"" | "serialize" | "deserialize">

Returns

void

Implementation of

IViewerPlugin.dispatchEvent

Inherited from

BaseGroundPlugin.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


refreshTransform

refreshTransform(): void

Returns

void

Inherited from

BaseGroundPlugin.refreshTransform

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:171


setOptions

setOptions(options): void

Parameters

NameType
optionsPartial<GroundOptions>

Returns

void

Inherited from

BaseGroundPlugin.setOptions

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:294


fromJSON

fromJSON(data, meta?): null | GroundPlugin<TMesh>

Parameters

NameType
dataany
meta?any

Returns

null | GroundPlugin<TMesh>

Implementation of

IViewerPlugin.fromJSON

Inherited from

BaseGroundPlugin.fromJSON

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:307


onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onAdded

Overrides

BaseGroundPlugin.onAdded

Defined in

webgi/src/plugins/GroundPlugin.ts:86


onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onDispose

Overrides

BaseGroundPlugin.onDispose

Defined in

webgi/src/plugins/GroundPlugin.ts:112


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onRemove

Overrides

BaseGroundPlugin.onRemove

Defined in

webgi/src/plugins/GroundPlugin.ts:116


refreshOptions

refreshOptions(): void

Returns

void

Overrides

BaseGroundPlugin.refreshOptions

Defined in

webgi/src/plugins/GroundPlugin.ts:143


_refreshTransform

Protected _refreshTransform(): void

Returns

void

Inherited from

BaseGroundPlugin._refreshTransform

Defined in

webgi/src/plugins/BaseGroundPlugin.ts:207


_createMesh

Protected _createMesh(): Mesh<BufferGeometry, Material | Material[]>

Returns

Mesh<BufferGeometry, Material | Material[]>

Overrides

BaseGroundPlugin._createMesh

Defined in

webgi/src/plugins/GroundPlugin.ts:55


_postFrame

Protected _postFrame(): void

Returns

void

Overrides

BaseGroundPlugin._postFrame

Defined in

webgi/src/plugins/GroundPlugin.ts:99


_preRender

Protected _preRender(): void

Returns

void

Overrides

BaseGroundPlugin._preRender

Defined in

webgi/src/plugins/GroundPlugin.ts:106


_removeMaterial

Protected _removeMaterial(): void

Returns

void

Overrides

BaseGroundPlugin._removeMaterial

Defined in

webgi/src/plugins/GroundPlugin.ts:120


_onSceneUpdate

Protected _onSceneUpdate(event): void

Parameters

NameType
eventIEvent<string>

Returns

void

Overrides

BaseGroundPlugin._onSceneUpdate

Defined in

webgi/src/plugins/GroundPlugin.ts:137


_refreshMaterial

Protected _refreshMaterial(): boolean

Returns

boolean

Overrides

BaseGroundPlugin._refreshMaterial

Defined in

webgi/src/plugins/GroundPlugin.ts:161


_extraUiConfig

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

Returns

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

Overrides

BaseGroundPlugin._extraUiConfig

Defined in

webgi/src/plugins/GroundPlugin.ts:183

Constructors

constructor

new GroundPlugin<TMesh>(options?, showDebug?)

Type parameters

NameType
TMeshextends Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2 = Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2

Parameters

NameTypeDefault value
optionsPartial<GroundOptions>{}
showDebugbooleanfalse

Overrides

BaseGroundPlugin.constructor

Defined in

webgi/src/plugins/GroundPlugin.ts:45