Appearance
@tmrw-realityos/charm • Docs
@tmrw-realityos/charm / Material
Class: Material
Constructors
new Material()
new Material():
Material
Returns
Defined in
packages/charm/src/scene/material.ts:75
Properties
alphaCutoff
alphaCutoff:
number
=0.5
Defined in
packages/charm/src/scene/material.ts:53
alphaMode
alphaMode:
eAlphaType
=eAlphaType.OPAQUE
Defined in
packages/charm/src/scene/material.ts:45
baseColor
baseColor:
vec4
Defined in
packages/charm/src/scene/material.ts:48
clearcoatFactor
clearcoatFactor:
number
=0.0
Defined in
packages/charm/src/scene/material.ts:63
clearcoatNormalFactor
clearcoatNormalFactor:
number
=1.0
Defined in
packages/charm/src/scene/material.ts:65
clearcoatRoughnessFactor
clearcoatRoughnessFactor:
number
=0.0
Defined in
packages/charm/src/scene/material.ts:64
dataBufferF32
dataBufferF32:
undefined
|Float32Array
Defined in
packages/charm/src/scene/material.ts:68
dataBufferU32
dataBufferU32:
undefined
|Uint32Array
Defined in
packages/charm/src/scene/material.ts:69
detailFactor
detailFactor:
number
=0.0
Defined in
packages/charm/src/scene/material.ts:58
displacementFactor
displacementFactor:
number
=0.0
Defined in
packages/charm/src/scene/material.ts:57
doubleSided
doubleSided:
boolean
=false
Defined in
packages/charm/src/scene/material.ts:46
emissiveColor
emissiveColor:
vec3
Defined in
packages/charm/src/scene/material.ts:52
has_changed
has_changed:
boolean
=true
Defined in
packages/charm/src/scene/material.ts:43
index
index:
number
=-1
Defined in
packages/charm/src/scene/material.ts:41
indexInBuffer
indexInBuffer:
number
=-1
Defined in
packages/charm/src/scene/material.ts:42
lastFrameUpdated
lastFrameUpdated:
number
=-1
Defined in
packages/charm/src/scene/material.ts:70
metallicFactor
metallicFactor:
number
=1.0
Defined in
packages/charm/src/scene/material.ts:50
model
model:
string
="pbr"
Defined in
packages/charm/src/scene/material.ts:40
name
name:
string
=""
Defined in
packages/charm/src/scene/material.ts:39
normalFactor
normalFactor:
number
=1.0
Defined in
packages/charm/src/scene/material.ts:54
normalTextureScale
normalTextureScale:
number
=1.0
Defined in
packages/charm/src/scene/material.ts:60
occlusionFactor
occlusionFactor:
number
=1.0
Defined in
packages/charm/src/scene/material.ts:55
occlusionTextureStrength
occlusionTextureStrength:
number
=1.0
Defined in
packages/charm/src/scene/material.ts:61
roughnessFactor
roughnessFactor:
number
=1.0
Defined in
packages/charm/src/scene/material.ts:51
specularColor
specularColor:
vec4
Defined in
packages/charm/src/scene/material.ts:49
textures
textures: (
undefined
|TextureInfo
)[]
Defined in
packages/charm/src/scene/material.ts:73
transmissionFactor
transmissionFactor:
number
=0.0
Defined in
packages/charm/src/scene/material.ts:56
channels
static
channels: typeofeTextureChannel
=eTextureChannel
Defined in
packages/charm/src/scene/material.ts:37
Accessors
color
get
color():vec4
set
color(v
):void
Parameters
• v: [number
, number
, number
] | Float32Array
| number
[] | [number
, number
, number
, number
]
Returns
vec4
Defined in
packages/charm/src/scene/material.ts:86
Methods
setTexture()
setTexture(
channel
,texture
):undefined
|TextureInfo
Parameters
• channel: eTextureChannel
• texture: undefined
| null
| string
Returns
undefined
| TextureInfo
Defined in
packages/charm/src/scene/material.ts:90
setTextureTransform()
setTextureTransform(
channel
,tileX
,tileY
,offsetX
,offsetY
,angle
):void
Parameters
• channel: eTextureChannel
• tileX: number
• tileY: number
• offsetX: number
= 0
• offsetY: number
= 0
• angle: number
= 0
Returns
void