Skip to content
On this page

Interface: MaterialProps ​

WebSG.MaterialProps

MaterialProps is an interface that defines the properties for creating a Material instance.

Table of contents ​

Properties ​

Properties ​

alphaCutoff ​

• Optional alphaCutoff: number

The alpha cutoff value for the material. Default is 0.5.

Defined in ​

websg.d.ts:355


alphaMode ​

• Optional alphaMode: AlphaMode

The alpha mode for the material. Default is 'OPAQUE'.

Defined in ​

websg.d.ts:359


baseColorFactor ​

• Optional baseColorFactor: ArrayLike<number>

The RGBA base color factor.

Defined in ​

websg.d.ts:363


baseColorTexture ​

• Optional baseColorTexture: Texture

The base color texture.

Defined in ​

websg.d.ts:367


doubleSided ​

• Optional doubleSided: boolean

Whether the material is visible from both sides. Default is false.

Defined in ​

websg.d.ts:351


emissiveFactor ​

• Optional emissiveFactor: ArrayLike<number>

The RGB emissive factor.

Defined in ​

websg.d.ts:399


emissiveTexture ​

• Optional emissiveTexture: Texture

The emissive texture.

Defined in ​

websg.d.ts:403


metallicFactor ​

• Optional metallicFactor: number

The metallic factor. Default is 1.

Defined in ​

websg.d.ts:371


metallicRoughnessTexture ​

• Optional metallicRoughnessTexture: Texture

The metallic-roughness texture.

Defined in ​

websg.d.ts:379


name ​

• Optional name: string

The name of the material.

Defined in ​

websg.d.ts:347


normalScale ​

• Optional normalScale: number

The scale for the normal texture. Default is 1.

Defined in ​

websg.d.ts:387


normalTexture ​

• Optional normalTexture: Texture

The normal texture.

Defined in ​

websg.d.ts:383


occlusionStrength ​

• Optional occlusionStrength: number

The occlusion strength. Default is 1.

Defined in ​

websg.d.ts:395


occlusionTexture ​

• Optional occlusionTexture: Texture

The occlusion texture.

Defined in ​

websg.d.ts:391


roughnessFactor ​

• Optional roughnessFactor: number

The roughness factor. Default is 1.

Defined in ​

websg.d.ts:375