Class: GroundPlugin<TMesh>
Plugins.GroundPlugin
Type parameters
| Name | Type |
|---|---|
TMesh | extends Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2 = Mesh<BufferGeometry, MeshStandardMaterial> | Reflector2 |
Hierarchy
BaseGroundPlugin<TMesh>↳
GroundPlugin
Implements
Properties
PluginType
▪ Static Readonly PluginType: "Ground"
dependencies
• dependencies: Class<IViewerPlugin<boolean>>[]
Implementation of
IViewerPluginAsync.dependencies
Inherited from
visible
• visible: boolean = true
Inherited from
size
• size: number = 8
Inherited from
yOffset
• yOffset: number = 0
Inherited from
renderToDepth
• renderToDepth: boolean = true
Inherited from
BaseGroundPlugin.renderToDepth
tonemapGround
• tonemapGround: boolean = true
Inherited from
BaseGroundPlugin.tonemapGround
limitCameraAboveGround
• limitCameraAboveGround: boolean = false
Inherited from
BaseGroundPlugin.limitCameraAboveGround
enableRefreshTransform
• enableRefreshTransform: boolean = true
Extra flag for plugins to disable transform refresh like when animating or dragging
Inherited from
BaseGroundPlugin.enableRefreshTransform
useModelBounds
• useModelBounds: boolean = false
Inherited from
BaseGroundPlugin.useModelBounds
bakedShadows
• bakedShadows: boolean = true
groundReflection
• groundReflection: boolean = false
physicalReflections
• physicalReflections: boolean = false
autoFrustumSize
• autoFrustumSize: boolean = true
autoBakeShadows
• autoBakeShadows: boolean = true
autoBakeShadows - when true, shadows are baked automatically on scene update(whenever any object in the scene changes), set it to false to trigger baking manually with {@see bakeShadows()}
_dirty
• Protected _dirty: boolean = false
Inherited from
_viewer
• Protected Optional _viewer: ViewerApp
Inherited from
_geometry
• Protected _geometry: BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>
Inherited from
_material
• Protected Optional _material: MeshStandardMaterial2<IMaterialEventMap>
Inherited from
_mesh
• Protected Optional _mesh: TMesh
Inherited from
_options
• Protected _options: GroundOptions
Inherited from
_manager
• Protected Optional _manager: AssetManagerPlugin
Inherited from
_uiConfig
• Protected Optional _uiConfig: UiObjectConfig<any, string>
Inherited from
Accessors
dirty
• get dirty(): boolean
Returns
boolean
Implementation of
Inherited from
BaseGroundPlugin.dirty
• set dirty(value): void
Parameters
| Name | Type |
|---|---|
value | boolean |
Returns
void
Implementation of
Inherited from
BaseGroundPlugin.dirty
viewer
• get viewer(): undefined | ViewerApp
Returns
undefined | ViewerApp
Inherited from
BaseGroundPlugin.viewer
enabled
• get enabled(): boolean
Returns
boolean
Inherited from
BaseGroundPlugin.enabled
• set enabled(value): void
Parameters
| Name | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
BaseGroundPlugin.enabled
material
• get material(): undefined | MeshStandardMaterial2<IMaterialEventMap>
Returns
undefined | MeshStandardMaterial2<IMaterialEventMap>
Inherited from
BaseGroundPlugin.material
mesh
• get mesh(): undefined | IModel<TMesh, IObject3DEventMap>
Returns
undefined | IModel<TMesh, IObject3DEventMap>
Inherited from
BaseGroundPlugin.mesh
autoAdjustTransform
• get autoAdjustTransform(): boolean
Returns
boolean
Inherited from
BaseGroundPlugin.autoAdjustTransform
• set autoAdjustTransform(value): void
Parameters
| Name | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
BaseGroundPlugin.autoAdjustTransform
uiConfig
• get uiConfig(): UiObjectConfig<any, string>
Returns
UiObjectConfig<any, string>
Implementation of
Inherited from
BaseGroundPlugin.uiConfig
shadowBaker
• get shadowBaker(): undefined | ShadowMapBaker
Returns
undefined | ShadowMapBaker
Methods
toJSON
▸ toJSON(meta?): any
Parameters
| Name | Type |
|---|---|
meta? | any |
Returns
any
Implementation of
IViewerPluginAsync.toJSON
Inherited from
exportState
▸ exportState(): any
Returns
any
Inherited from
importState
▸ importState(state): Promise<void>
Parameters
| Name | Type |
|---|---|
state | any |
Returns
Promise<void>
Inherited from
storeState
▸ storeState(prefix?, storage?, data?): void
Parameters
| Name | Type |
|---|---|
prefix? | string |
storage? | Storage |
data? | any |
Returns
void
Implementation of
Inherited from
loadState
▸ loadState(prefix?, storage?): Promise<void>
Parameters
| Name | Type |
|---|---|
prefix? | string |
storage? | Storage |
Returns
Promise<void>
Implementation of
Inherited from
setGeometry
▸ setGeometry(g?): void
Parameters
| Name | Type |
|---|---|
g? | BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap> |
Returns
void
Inherited from
refreshTransform
▸ refreshTransform(): void
Returns
void
Inherited from
BaseGroundPlugin.refreshTransform
setOptions
▸ setOptions(options): void
Parameters
| Name | Type |
|---|---|
options | Partial<GroundOptions> |
Returns
void
Inherited from
bakeShadows
▸ bakeShadows(): void
bake shadows manually, to be used with {@see autoBakeShadows} set to false
Returns
void
onAdded
▸ onAdded(viewer): Promise<void>
Parameters
| Name | Type |
|---|---|
viewer | ViewerApp |
Returns
Promise<void>
Implementation of
Overrides
onDispose
▸ onDispose(viewer): Promise<void>
Parameters
| Name | Type |
|---|---|
viewer | ViewerApp |
Returns
Promise<void>
Implementation of
Overrides
onRemove
▸ onRemove(viewer): Promise<void>
Parameters
| Name | Type |
|---|---|
viewer | ViewerApp |
Returns
Promise<void>
Implementation of
Overrides
refreshOptions
▸ refreshOptions(): void
Returns
void
Overrides
BaseGroundPlugin.refreshOptions
fromJSON
▸ fromJSON(data, meta?): null | GroundPlugin<TMesh>
Parameters
| Name | Type |
|---|---|
data | any |
meta? | any |
Returns
null | GroundPlugin<TMesh>
Implementation of
IViewerPluginAsync.fromJSON
Overrides
_storeKey
▸ Protected _storeKey(prefix?): string
Parameters
| Name | Type |
|---|---|
prefix? | string |
Returns
string
Inherited from
_createMesh
▸ Protected _createMesh(): Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, Material<MaterialEventMap> | Material<MaterialEventMap>[], Object3DEventMap>
Returns
Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, Material<MaterialEventMap> | Material<MaterialEventMap>[], Object3DEventMap>
Overrides
_postFrame
▸ Protected _postFrame(): void
Returns
void
Overrides
_preRender
▸ Protected _preRender(): void
Returns
void
Overrides
_removeMaterial
▸ Protected _removeMaterial(): void
Returns
void
Overrides
BaseGroundPlugin._removeMaterial
_onSceneUpdate
▸ Protected _onSceneUpdate(event): void
Parameters
| Name | Type |
|---|---|
event | IEvent<string> |
Returns
void
Overrides
BaseGroundPlugin._onSceneUpdate
_refreshTransform
▸ Protected _refreshTransform(): void
Returns
void
Overrides
BaseGroundPlugin._refreshTransform
_refreshMaterial
▸ Protected _refreshMaterial(): boolean
Returns
boolean
Overrides
BaseGroundPlugin._refreshMaterial
_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
Constructors
constructor
• new GroundPlugin<TMesh>(options?, showDebug?)
Type parameters
| Name | Type |
|---|---|
TMesh | extends Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, MeshStandardMaterial<MaterialEventMap>, Object3DEventMap> | Reflector2 = Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, MeshStandardMaterial<MaterialEventMap>, Object3DEventMap> | Reflector2 |
Parameters
| Name | Type | Default value |
|---|---|---|
options | Partial<GroundOptions> | {} |
showDebug | boolean | false |