Interface: MaterialProps
WebSG.MaterialProps
MaterialProps is an interface that defines the properties for creating a Material instance.
Table of contents
Properties
- alphaCutoff
- alphaMode
- baseColorFactor
- baseColorTexture
- doubleSided
- emissiveFactor
- emissiveTexture
- metallicFactor
- metallicRoughnessTexture
- name
- normalScale
- normalTexture
- occlusionStrength
- occlusionTexture
- roughnessFactor
Properties
alphaCutoff
• Optional alphaCutoff: number
The alpha cutoff value for the material. Default is 0.5.
Defined in
alphaMode
• Optional alphaMode: AlphaMode
The alpha mode for the material. Default is 'OPAQUE'.
Defined in
baseColorFactor
• Optional baseColorFactor: ArrayLike<number>
The RGBA base color factor.
Defined in
baseColorTexture
• Optional baseColorTexture: Texture
The base color texture.
Defined in
doubleSided
• Optional doubleSided: boolean
Whether the material is visible from both sides. Default is false.
Defined in
emissiveFactor
• Optional emissiveFactor: ArrayLike<number>
The RGB emissive factor.
Defined in
emissiveTexture
• Optional emissiveTexture: Texture
The emissive texture.
Defined in
metallicFactor
• Optional metallicFactor: number
The metallic factor. Default is 1.
Defined in
metallicRoughnessTexture
• Optional metallicRoughnessTexture: Texture
The metallic-roughness texture.
Defined in
name
• Optional name: string
The name of the material.
Defined in
normalScale
• Optional normalScale: number
The scale for the normal texture. Default is 1.
Defined in
normalTexture
• Optional normalTexture: Texture
The normal texture.
Defined in
occlusionStrength
• Optional occlusionStrength: number
The occlusion strength. Default is 1.
Defined in
occlusionTexture
• Optional occlusionTexture: Texture
The occlusion texture.
Defined in
roughnessFactor
• Optional roughnessFactor: number
The roughness factor. Default is 1.