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:93


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


forceSceneEnvMap

forceSceneEnvMap: boolean = false

Defined in

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


uiConfig

uiConfig: UiObjectConfig<any, string>

Defined in

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


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:25


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:29

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:18

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:22


envMapRotation

get envMapRotation(): number

Returns

number

Defined in

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

set envMapRotation(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

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

Methods

onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:38


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:47


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:54


getEnvMap

getEnvMap(): null | ITexture<any>

Returns

null | ITexture<any>

Defined in

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


refreshEnvMaps

refreshEnvMaps(): void

Returns

void

Defined in

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


refreshUi

refreshUi(): void

Returns

void

Defined in

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


onAdded

onAdded(v): Promise<void>

Parameters

NameType
vViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded

Defined in

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


onRemove

onRemove(v): Promise<void>

Parameters

NameType
vViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onRemove

Defined in

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


prepareDiamondMesh

prepareDiamondMesh(mesh, __namedParameters): void

Parameters

NameType
meshMesh<BufferGeometry, Material | Material[]>
__namedParametersDiamondGeometryParameters

Returns

void

Defined in

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


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:240


makeDiamondMesh

makeDiamondMesh(mesh, geometryParams, materialParams): void

Assigns a new material to the mesh

Parameters

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

Returns

void

Defined in

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


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

Inherited from

AViewerPlugin.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

Inherited from

AViewerPlugin.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

Inherited from

AViewerPlugin.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

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

Returns

void

Inherited from

AViewerPlugin.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74

Constructors

constructor

new DiamondPlugin()

Overrides

AViewerPlugin.constructor

Defined in

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