Skip to main content

Material3D

Description:

  A per-instance material slot owned by a Model3D instance.

baseColor

Type: Field.

Description:

  The base color factor.

Signature:

baseColor: Color

emissive

Type: Field.

Description:

  The emissive color factor.

Signature:

emissive: Color3

metallic

Type: Field.

Description:

  The metallic factor.

Signature:

metallic: number

roughness

Type: Field.

Description:

  The roughness factor.

Signature:

roughness: number

alphaMode

Type: Field.

Description:

  Alpha mode: 0 opaque, 1 mask, 2 blend.

Signature:

alphaMode: integer

alphaCutoff

Type: Field.

Description:

  The alpha cutoff used in mask mode.

Signature:

alphaCutoff: number

setBaseColorTexture

Type: Function.

Description:

  Sets the base color texture.

Signature:

setBaseColorTexture: function(self: Material3D, texture: Texture2D)

clearBaseColorTexture

Type: Function.

Description:

  Clears the base color texture.

Signature:

clearBaseColorTexture: function(self: Material3D)

setMetallicRoughnessTexture

Type: Function.

Description:

  Sets the metallic-roughness texture.

Signature:

setMetallicRoughnessTexture: function(self: Material3D, texture: Texture2D)

clearMetallicRoughnessTexture

Type: Function.

Description:

  Clears the metallic-roughness texture.

Signature:

clearMetallicRoughnessTexture: function(self: Material3D)

setNormalTexture

Type: Function.

Description:

  Sets the normal texture.

Signature:

setNormalTexture: function(self: Material3D, texture: Texture2D)

clearNormalTexture

Type: Function.

Description:

  Clears the normal texture.

Signature:

clearNormalTexture: function(self: Material3D)

setEmissiveTexture

Type: Function.

Description:

  Sets the emissive texture.

Signature:

setEmissiveTexture: function(self: Material3D, texture: Texture2D)

clearEmissiveTexture

Type: Function.

Description:

  Clears the emissive texture.

Signature:

clearEmissiveTexture: function(self: Material3D)

setOcclusionTexture

Type: Function.

Description:

  Sets the occlusion texture.

Signature:

setOcclusionTexture: function(self: Material3D, texture: Texture2D)

clearOcclusionTexture

Type: Function.

Description:

  Clears the occlusion texture.

Signature:

clearOcclusionTexture: function(self: Material3D)