Class: LitMaterial
Hierarchy
↳
LitMaterial
Constructors
Properties
Accessors
- baseMap
- maskMap
- normalMap
- emissiveMap
- aoMap
- clearCoatRoughnessMap
- clearcoatColor
- clearcoatWeight
- clearcoatFactor
- clearcoatRoughnessFactor
- ior
- alphaCutoff
- baseColor
- roughness
- metallic
- emissiveColor
- emissiveIntensity
- ao
- shader
- doubleSide
- castShadow
- acceptShadow
- castReflection
- blendMode
- depthCompare
- transparent
- cullMode
- depthWriteEnabled
- useBillboard
Methods
- clone
- getPass
- getAllPass
- destroy
- setDefine
- setTexture
- setStorageBuffer
- setUniformBuffer
- setUniformFloat
- setUniformVector2
- setUniformVector3
- setUniformVector4
- setUniformColor
- getUniformFloat
- getUniformV2
- getUniformV3
- getUniformV4
- getUniformColor
- getTexture
- getStorageBuffer
- getStructStorageBuffer
- getUniformBuffer
- applyUniform
Constructors
constructor
• new LitMaterial(): LitMaterial
Returns
Overrides
Defined in
src/materials/LitMaterial.ts:12
Properties
instanceID
• instanceID: string
Material Unique Identifier
Inherited from
Defined in
name
• name: string
name of this material
Inherited from
Defined in
enable
• enable: boolean
= true
Inherited from
Defined in
Accessors
baseMap
• get
baseMap(): Texture
Returns
Defined in
src/materials/LitMaterial.ts:69
• set
baseMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
src/materials/LitMaterial.ts:65
maskMap
• get
maskMap(): Texture
Returns
Defined in
src/materials/LitMaterial.ts:77
• set
maskMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
src/materials/LitMaterial.ts:73
normalMap
• get
normalMap(): Texture
Returns
Defined in
src/materials/LitMaterial.ts:86
• set
normalMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
src/materials/LitMaterial.ts:82
emissiveMap
• get
emissiveMap(): Texture
Returns
Defined in
src/materials/LitMaterial.ts:94
• set
emissiveMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
src/materials/LitMaterial.ts:90
aoMap
• get
aoMap(): Texture
Returns
Defined in
src/materials/LitMaterial.ts:102
• set
aoMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
src/materials/LitMaterial.ts:98
clearCoatRoughnessMap
• get
clearCoatRoughnessMap(): Texture
Returns
Defined in
src/materials/LitMaterial.ts:112
• set
clearCoatRoughnessMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
src/materials/LitMaterial.ts:106
clearcoatColor
• get
clearcoatColor(): Color
Returns
Defined in
src/materials/LitMaterial.ts:121
• set
clearcoatColor(value
): void
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Defined in
src/materials/LitMaterial.ts:116
clearcoatWeight
• get
clearcoatWeight(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:130
• set
clearcoatWeight(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:125
clearcoatFactor
• get
clearcoatFactor(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:139
• set
clearcoatFactor(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:134
clearcoatRoughnessFactor
• get
clearcoatRoughnessFactor(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:149
• set
clearcoatRoughnessFactor(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:144
ior
• get
ior(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:157
• set
ior(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:153
alphaCutoff
• get
alphaCutoff(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:166
• set
alphaCutoff(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:162
baseColor
• get
baseColor(): Color
get base color (tint color)
Returns
Defined in
src/materials/LitMaterial.ts:180
• set
baseColor(color
): void
set base color (tint color)
Parameters
Name | Type |
---|---|
color | Color |
Returns
void
Defined in
src/materials/LitMaterial.ts:173
roughness
• get
roughness(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:184
• set
roughness(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:188
metallic
• get
metallic(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:192
• set
metallic(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:196
emissiveColor
• get
emissiveColor(): Color
Returns
Defined in
src/materials/LitMaterial.ts:200
• set
emissiveColor(value
): void
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Defined in
src/materials/LitMaterial.ts:204
emissiveIntensity
• get
emissiveIntensity(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:208
• set
emissiveIntensity(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:212
ao
• get
ao(): number
Returns
number
Defined in
src/materials/LitMaterial.ts:216
• set
ao(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/materials/LitMaterial.ts:220
shader
• get
shader(): Shader
Returns
Inherited from
Material.shader
Defined in
• set
shader(shader
): void
Parameters
Name | Type |
---|---|
shader | Shader |
Returns
void
Inherited from
Material.shader
Defined in
doubleSide
• get
doubleSide(): boolean
Returns
boolean
Inherited from
Material.doubleSide
Defined in
• set
doubleSide(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.doubleSide
Defined in
castShadow
• get
castShadow(): boolean
Returns
boolean
Inherited from
Material.castShadow
Defined in
• set
castShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.castShadow
Defined in
acceptShadow
• get
acceptShadow(): boolean
Returns
boolean
Inherited from
Material.acceptShadow
Defined in
• set
acceptShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.acceptShadow
Defined in
castReflection
• get
castReflection(): boolean
Returns
boolean
Inherited from
Material.castReflection
Defined in
• set
castReflection(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.castReflection
Defined in
blendMode
• get
blendMode(): BlendMode
Returns
Inherited from
Material.blendMode
Defined in
• set
blendMode(value
): void
Parameters
Name | Type |
---|---|
value | BlendMode |
Returns
void
Inherited from
Material.blendMode
Defined in
depthCompare
• get
depthCompare(): GPUCompareFunction
Returns
GPUCompareFunction
Inherited from
Material.depthCompare
Defined in
• set
depthCompare(value
): void
Parameters
Name | Type |
---|---|
value | GPUCompareFunction |
Returns
void
Inherited from
Material.depthCompare
Defined in
transparent
• get
transparent(): boolean
Returns
boolean
Inherited from
Material.transparent
Defined in
• set
transparent(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.transparent
Defined in
cullMode
• get
cullMode(): GPUCullMode
Returns
GPUCullMode
Inherited from
Material.cullMode
Defined in
• set
cullMode(value
): void
Parameters
Name | Type |
---|---|
value | GPUCullMode |
Returns
void
Inherited from
Material.cullMode
Defined in
depthWriteEnabled
• get
depthWriteEnabled(): boolean
Returns
boolean
Inherited from
Material.depthWriteEnabled
Defined in
• set
depthWriteEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.depthWriteEnabled
Defined in
useBillboard
• set
useBillboard(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.useBillboard
Defined in
Methods
clone
▸ clone(): Material
clone one material
Returns
Material
Overrides
Defined in
src/materials/LitMaterial.ts:19
getPass
▸ getPass(passType
): RenderShaderPass
[]
get render pass by renderType
Parameters
Name | Type |
---|---|
passType | PassType |
Returns
Inherited from
Defined in
getAllPass
▸ getAllPass(): RenderShaderPass
[]
get all color render pass
Returns
Inherited from
Defined in
destroy
▸ destroy(force
): void
Parameters
Name | Type |
---|---|
force | boolean |
Returns
void
Inherited from
Defined in
setDefine
▸ setDefine(define
, value
): void
Parameters
Name | Type |
---|---|
define | string |
value | boolean |
Returns
void
Inherited from
Defined in
setTexture
▸ setTexture(propertyName
, texture
): void
Parameters
Name | Type |
---|---|
propertyName | string |
texture | Texture |
Returns
void
Inherited from
Defined in
setStorageBuffer
▸ setStorageBuffer(propertyName
, buffer
): void
Parameters
Name | Type |
---|---|
propertyName | string |
buffer | StorageGPUBuffer |
Returns
void
Inherited from
Defined in
setUniformBuffer
▸ setUniformBuffer(propertyName
, buffer
): void
Parameters
Name | Type |
---|---|
propertyName | string |
buffer | UniformGPUBuffer |
Returns
void
Inherited from
Defined in
setUniformFloat
▸ setUniformFloat(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | number |
Returns
void
Inherited from
Defined in
setUniformVector2
▸ setUniformVector2(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Vector2 |
Returns
void
Inherited from
Defined in
setUniformVector3
▸ setUniformVector3(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Vector3 |
Returns
void
Inherited from
Defined in
setUniformVector4
▸ setUniformVector4(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Vector4 |
Returns
void
Inherited from
Defined in
setUniformColor
▸ setUniformColor(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Color |
Returns
void
Inherited from
Defined in
getUniformFloat
▸ getUniformFloat(str
): any
Parameters
Name | Type |
---|---|
str | string |
Returns
any
Inherited from
Defined in
getUniformV2
▸ getUniformV2(str
): Vector2
Parameters
Name | Type |
---|---|
str | string |
Returns
Inherited from
Defined in
getUniformV3
▸ getUniformV3(str
): Vector3
Parameters
Name | Type |
---|---|
str | string |
Returns
Inherited from
Defined in
getUniformV4
▸ getUniformV4(str
): Vector4
Parameters
Name | Type |
---|---|
str | string |
Returns
Vector4
Inherited from
Defined in
getUniformColor
▸ getUniformColor(str
): Color
Parameters
Name | Type |
---|---|
str | string |
Returns
Inherited from
Defined in
getTexture
▸ getTexture(str
): Texture
Parameters
Name | Type |
---|---|
str | string |
Returns
Inherited from
Defined in
getStorageBuffer
▸ getStorageBuffer(str
): StorageGPUBuffer
Parameters
Name | Type |
---|---|
str | string |
Returns
Inherited from
Defined in
getStructStorageBuffer
▸ getStructStorageBuffer(str
): GPUBufferBase
Parameters
Name | Type |
---|---|
str | string |
Returns
GPUBufferBase
Inherited from
Material.getStructStorageBuffer
Defined in
getUniformBuffer
▸ getUniformBuffer(str
): GPUBufferBase
Parameters
Name | Type |
---|---|
str | string |
Returns
GPUBufferBase
Inherited from
Defined in
applyUniform
▸ applyUniform(): void
Returns
void