Skip to main content

Class: DiamondMaterial

Extra-Helpers.DiamondMaterial

Hierarchy

  • ShaderMaterial

    DiamondMaterial

Implements

Properties

TypeSlug

Static Readonly TypeSlug: "dmat"

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:29


TYPE

Static Readonly TYPE: "DiamondMaterial"

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:317


typeSlug

Readonly typeSlug: "dmat"

Implementation of

IMaterial.typeSlug

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:30


materialExtensions

materialExtensions: MaterialExtension[]

Implementation of

IMaterial.materialExtensions

Defined in

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


assetType

assetType: "material"

Implementation of

IMaterial.assetType

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:32


isDiamondMaterial

isDiamondMaterial: true

Defined in

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


color

color: Color

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:46


envMapIntensity

envMapIntensity: number = 1.

Defined in

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


envMapRotationOffset

envMapRotationOffset: number = 0.

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:53


dispersion

dispersion: number = 0.012

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:56


absorptionFactor

absorptionFactor: number = 1

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:59


refractiveIndex

refractiveIndex: number = 2.4

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:62


squashFactor

squashFactor: number = 0.98

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:64


geometryFactor

geometryFactor: number = 0.5

Defined in

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


gammaFactor

gammaFactor: number = 1

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:68


boostFactors

boostFactors: Vector3

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:71


transmission

transmission: number = 0.

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:74


reflectivity

reflectivity: number = 0.5

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:77


rayBounces

rayBounces: number = 5

Defined in

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


diamondOrientedEnvMap

diamondOrientedEnvMap: number = 0

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:85


normalsCaptureMap

normalsCaptureMap: null | Texture = null

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:87


extraUniformsToUpload

extraUniformsToUpload: Object

Type declaration

NameType
inverseModelMatrix{ value: Matrix4 }
inverseModelMatrix.valueMatrix4
radius{ value: number = 1 }
radius.valuenumber
centerOffset{ value: Vector3 }
centerOffset.valueVector3
modelOffsetMatrix{ value: Matrix4 }
modelOffsetMatrix.valueMatrix4
modelOffsetMatrixInv{ value: Matrix4 }
modelOffsetMatrixInv.valueMatrix4

Implementation of

IMaterial.extraUniformsToUpload

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:89


envMapIndex

envMapIndex: number = 0

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:247

Accessors

mmMaterial

get mmMaterial(): this

Returns

this

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:33


materialObject

get materialObject(): this

Returns

this

Implementation of

IMaterial.materialObject

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:36


envMaps

set envMaps(value): void

Parameters

NameType
value(null | ITexture<any>)[]

Returns

void

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:242


envMap

get envMap(): null | ITexture<any>

Returns

null | ITexture<any>

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:255

set envMap(val): void

Parameters

NameType
valnull | ITexture<any>

Returns

void

Defined in

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


uiConfig

get uiConfig(): UiObjectConfig<any, string>

Returns

UiObjectConfig<any, string>

Implementation of

IMaterial.uiConfig

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:319

Methods

onBeforeRender

onBeforeRender(renderer, scene, camera, geometry, object): void

Parameters

NameType
rendererWebGLRenderer
sceneScene<Event, string>
cameraCamera<Event, string>
geometryBufferGeometry<NormalBufferAttributes, Event, string>
objectObject3D<Event, string>

Returns

void

Overrides

ShaderMaterial.onBeforeRender

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:98


onAfterRender

onAfterRender(renderer, scene, camera, geometry, object): void

Parameters

NameType
rendererWebGLRenderer
sceneScene<Event, string>
cameraCamera<Event, string>
geometryBufferGeometry<NormalBufferAttributes, Event, string>
objectObject3D<Event, string>

Returns

void

Overrides

ShaderMaterial.onAfterRender

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:148


registerMaterialExtensions

registerMaterialExtensions(customMaterialExtensions): void

Parameters

NameType
customMaterialExtensionsMaterialExtension[]

Returns

void

Implementation of

IMaterial.registerMaterialExtensions

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:214


unregisterMaterialExtensions

unregisterMaterialExtensions(customMaterialExtensions): void

Parameters

NameType
customMaterialExtensionsMaterialExtension[]

Returns

void

Implementation of

IMaterial.unregisterMaterialExtensions

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:217


onBeforeCompile

onBeforeCompile(shader, renderer): void

Parameters

NameType
shaderShader
rendererWebGLRenderer

Returns

void

Overrides

ShaderMaterial.onBeforeCompile

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:221


customProgramCacheKey

customProgramCacheKey(): string

Returns

string

Overrides

ShaderMaterial.customProgramCacheKey

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:232


setDirty

setDirty(options?): void

Parameters

NameType
options?AnyOptions

Returns

void

Implementation of

IMaterial.setDirty

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:236


refreshEnvUniform

refreshEnvUniform(): void

Returns

void

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:249


clone

clone(): DiamondMaterial

Returns

DiamondMaterial

Implementation of

IMaterial.clone

Overrides

ShaderMaterial.clone

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:263


toJSON

toJSON(meta?): DiamondMaterialParameters

Parameters

NameType
meta?any

Returns

DiamondMaterialParameters

Implementation of

IMaterial.toJSON

Overrides

ShaderMaterial.toJSON

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:268


copyProps

copyProps(oldMaterial): DiamondMaterial

Parameters

NameType
oldMaterialDiamondMaterialParameters

Returns

DiamondMaterial

Implementation of

IMaterial.copyProps

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:392


fromJSON

fromJSON(data, meta?): null | DiamondMaterial

Parameters

NameType
dataany
meta?any

Returns

null | DiamondMaterial

Implementation of

IMaterial.fromJSON

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:413

Constructors

constructor

new DiamondMaterial(parameters)

Parameters

NameType
parametersDiamondMaterialParameters & { customMaterialExtensions?: MaterialExtension[] }

Overrides

ShaderMaterial.constructor

Defined in

webgi/src/extras/ijewel/diamondMaterial.ts:157