Skip to main content

Class: DiamondPlugin

Plugins.DiamondPlugin

Hierarchy

Properties

PluginType

Static Readonly PluginType: "Diamond"

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:27


DIAMOND_GLTF_EXTENSION

Static Readonly DIAMOND_GLTF_EXTENSION: "WEBGI_materials_diamond"

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:109


offsetCache

offsetCache: Record<string, IDiamondGeometryOffsets> = {}

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:28


enabled

enabled: boolean = true

Overrides

AViewerPlugin.enabled

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:31


envMap

envMap: null | ITexture<any> = null

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:35


envMap2

envMap2: null | ITexture<any> = null

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:39


envMap3

envMap3: null | ITexture<any> = null

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:43


forceSceneEnvMap

forceSceneEnvMap: boolean = false

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:47


uiConfig

uiConfig: UiObjectConfig<any, string>

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:387


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:23


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:27

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:16

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:20


envMapRotation

get envMapRotation(): number

Returns

number

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:49

set envMapRotation(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:52

Methods

onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:36


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:45


fromJSON

fromJSON(data, meta?): null | DiamondPlugin | Promise<null | DiamondPlugin>

Parameters

NameType
dataany
meta?any

Returns

null | DiamondPlugin | Promise<null | DiamondPlugin>

Inherited from

AViewerPlugin.fromJSON

Defined in

webgi/src/core/AViewerPlugin.ts:52


exportState

exportState(): any

Returns

any

Inherited from

AViewerPlugin.exportState

Defined in

webgi/src/core/AViewerPlugin.ts:64


importState

importState(state): Promise<void>

Parameters

NameType
stateany

Returns

Promise<void>

Inherited from

AViewerPlugin.importState

Defined in

webgi/src/core/AViewerPlugin.ts:67


storeState

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

Parameters

NameType
prefix?string
storage?Storage
data?any

Returns

void

Inherited from

AViewerPlugin.storeState

Defined in

webgi/src/core/AViewerPlugin.ts:74


loadState

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

Parameters

NameType
prefix?string
storage?Storage

Returns

Promise<void>

Inherited from

AViewerPlugin.loadState

Defined in

webgi/src/core/AViewerPlugin.ts:84


getEnvMaps

getEnvMaps(): (null | ITexture<any>)[]

Returns

(null | ITexture<any>)[]

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:65


refreshEnvMaps

refreshEnvMaps(): void

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:73


refreshUi

refreshUi(): void

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:153


onAdded

onAdded(v): Promise<void>

Parameters

NameType
vViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:158


onRemove

onRemove(v): Promise<void>

Parameters

NameType
vViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onRemove

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:226


prepareDiamondMesh

prepareDiamondMesh(mesh, __namedParameters): void

Parameters

NameType
meshMesh<BufferGeometry<NormalBufferAttributes, Event, string>, Material<Event, string> | Material<Event, string>[]>
__namedParametersDiamondGeometryParameters

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:238


makeDiamond

makeDiamond(material, geometryParams, materialParams): void

Creates a new diamond material, prepare all the mesh assigned to the material, and set the new material on all the meshes.

Parameters

NameType
materialundefined | IMaterial<any>
geometryParamsDiamondGeometryParameters
materialParamsDiamondMaterialParameters & { isDiamond?: true }

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:282


makeDiamondMesh

makeDiamondMesh(mesh, geometryParams, materialParams): void

Assigns a new material to the mesh

Parameters

NameType
meshIModel<Mesh<BufferGeometry<NormalBufferAttributes, Event, string>, Material<Event, string> | Material<Event, string>[]>>
geometryParamsDiamondGeometryParameters
materialParamsDiamondMaterialParameters & { isDiamond?: true }

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:301


disposeCacheMap

disposeCacheMap(cacheKey): void

Parameters

NameType
cacheKeystring

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:378


disposeAllCacheMaps

disposeAllCacheMaps(): void

Returns

void

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:382


_storeKey

Protected _storeKey(prefix?): string

Parameters

NameType
prefix?string

Returns

string

Inherited from

AViewerPlugin._storeKey

Defined in

webgi/src/core/AViewerPlugin.ts:60

Constructors

constructor

new DiamondPlugin()

Overrides

AViewerPlugin.constructor

Defined in

webgi/src/extras/ijewel/diamondPlugin.ts:97