Skip to content

Material

The Material class defines how a 3D surface is rendered, extending the Item base class. It provides options for culling, shading workflows, texture wrapping and filtering, anisotropy, normal mapping, and blending. Materials are applied to objects in a scene to control their appearance, from solid opaque surfaces to transparent or stylized effects.

Inherits from

Item

Usage

To use this class, add the following require at the top of your script:

local Material = require 'engine/items/material'

Reference

create

static async create(self, attributes)

Create a new material instance.

This function initializes a new Material object with specified attributes. The attributes can include colors, textures, shader links, floats, enums, and other material properties. All attributes are optional and override engine defaults.

Parameters

  • self
  • attributes (table): Optional table of material attributes to override defaults.

Example

local customMaterial = Material:create({
    DiffuseColor = { r=200, g=100, b=50, a=255 },
    RoughnessIntensity = 0.8,
   MaterialType = Material.MaterialType.Toon
})

Properties

You can access these properties directly on the object or through :get("propertyName") or :set("propertyName", value) methods.

Property Type Default Description
materialType Enum Physical Options: Physical, Shader, Point, Basic, Normal, Toon, Matcap, Lambert, Phong
vertexColors Boolean false
alphaTest Float 0
transparent Boolean false
mode Enum Normal Options: None, Normal, Additive, Subtractive, Multiply, Custom
active Boolean true
mode Enum Back Options: Front, Back, Off

getWorkflow

getWorkflow()

Retrieves the workflow value for the material.

Returns

  • string: current workflow value of the material. Expected to be a value from Material.Workflow.

setWorkflow

setWorkflow(workflow)

Sets the workflow for the material.

Parameters

  • workflow (string): The desired workflow value. Expected to be a value from Material.Workflow.

getAttenuationColor

getAttenuationColor()

Retrieves the attenuation color for the material.

Returns

  • Color: table representing the RGB color values, or any suitable color representation of the attenuation color.

setAttenuationColor

setAttenuationColor(color)

Sets the attenuation color for the material.

Parameters

  • color (Color): A table representing the RGB color values, or any suitable color representation.

getAttenuationDistance

getAttenuationDistance()

Retrieves the attenuation distance for the material.

Returns

  • number: number representing the attenuation distance.

setAttenuationDistance

setAttenuationDistance(distance)

Sets the attenuation distance for the material.

Parameters

  • distance (number): A number representing the attenuation distance.

getDiffuseColor

getDiffuseColor()

Retrieves the diffuse color for the material.

Returns

  • Color: diffuse color

setDiffuseColor

setDiffuseColor(color)

Sets the diffuse color for the material.

Parameters

  • color (Color): The diffuse color to set

getAlbedoMap

getAlbedoMap()

Get the albedo texture or video or nil if none is linked

Returns

  • Texture: Video or nil

setAlbedoMap

setAlbedoMap(linkItem)

Set the albedo texture or video

Parameters

  • linkItem (texture): or video to use

getAlbedoWrapS

getAlbedoWrapS()

Gets the wrap mode along the s-axis (usually horizontal) for the albedo map.

Returns

  • WrapMode

setAlbedoWrapS

setAlbedoWrapS(mode)

Sets the wrap mode along the s-axis (usually horizontal) for the albedo map.

Parameters

  • mode

getAlbedoWrapT

getAlbedoWrapT()

Sets the wrap mode along the t-axis (usually vertical) for the albedo map.

Returns

  • WrapMode

setAlbedoWrapT

setAlbedoWrapT(mode)

Sets the wrap mode along the t-axis (usually vertical) for the albedo map.

Parameters

  • mode

getAlbedoMagFilter

getAlbedoMagFilter()

Gets the magnification filter for the albedo map.

Returns

  • MagFilter: magnification filter.

setAlbedoMagFilter

setAlbedoMagFilter(filter)

Sets the magnification filter for the albedo map.

Parameters

  • filter (MagFilter): The magnification filter.

getAlbedoMinFilter

getAlbedoMinFilter()

Gets the minification filter for the albedo map.

Returns

  • MinFilter: minification filter..

setAlbedoMinFilter

setAlbedoMinFilter(filter)

Sets the minification filter for the albedo map.

Parameters

  • filter (MinFilter): The minification filter..

getAlbedoAnisotropy

getAlbedoAnisotropy()

Gets the anisotropy level for the albedo map.

Returns

  • Anisotropy: anisotropy level..

setAlbedoAnisotropy

setAlbedoAnisotropy(anisotropy)

Sets the anisotropy level for the albedo map.

Parameters

  • anisotropy

getAlphaTest

getAlphaTest()

Get the alpha test value of the material.

Returns

  • number: alpha test value.

setAlphaTest

setAlphaTest(amount)

Set the alpha test value of the material.

Parameters

  • amount (number): The alpha test value.

getTransparent

getTransparent()

Check if the material is transparent.

Returns

  • boolean: if transparent, false otherwise.

setTransparent

setTransparent(enabled)

Set the transparency of the material.

Parameters

  • enabled (boolean): True if transparent, false otherwise.

getOpacity

getOpacity()

Get the opacity of the material.

Returns

  • number: opacity value.

setOpacity

setOpacity(amount)

Set the opacity of the material.

Parameters

  • amount (number): The opacity value.

getAlphaMap

getAlphaMap()

Get the alpha map of the material.

Returns

  • Texture: alpha map texture.

setAlphaMap

setAlphaMap(texture)

Set the alpha map of the material.

Parameters

  • texture (Texture): The alpha map texture.

getAlphaWrapS

getAlphaWrapS()

Get the alpha wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setAlphaWrapS

setAlphaWrapS(mode)

Set the alpha wrap S mode of the material.

Parameters

getAlphaWrapT

getAlphaWrapT()

Get the alpha wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setAlphaWrapT

setAlphaWrapT(mode)

Set the alpha wrap T mode of the material.

Parameters

getAlphaMagFilter

getAlphaMagFilter()

Get the alpha magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setAlphaMagFilter

setAlphaMagFilter(filter)

Set the alpha magnification filter of the material.

Parameters

  • filter (MagFilter): The magnification filter mode.

getAlphaMinFilter

getAlphaMinFilter()

Get the alpha minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setAlphaMinFilter

setAlphaMinFilter(filter)

Set the alpha minification filter of the material.

Parameters

  • filter (MinFilter): The minification filter mode.

getAlphaAnisotropy

getAlphaAnisotropy()

Get the alpha anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setAlphaAnisotropy

setAlphaAnisotropy(anisotropy)

Set the alpha anisotropy mode of the material.

Parameters

  • anisotropy

getEmissiveColor

getEmissiveColor()

Get the emissive color of the material.

Returns

  • Color: emissive color.

setEmissiveColor

setEmissiveColor(color)

Set the emissive color of the material.

Parameters

  • color (Color): The emissive color. Default is black.

getEmissiveMap

getEmissiveMap()

Get the emissive texture or nil if none is linked.

Returns

  • Texture: texture or nil.

setEmissiveMap

setEmissiveMap(texture)

Set the emissive texture.

Parameters

  • texture (Texture): Texture to use or nil.

getEmissiveWrapS

getEmissiveWrapS()

Get the emissive wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setEmissiveWrapS

setEmissiveWrapS(mode)

Set the emissive wrap S mode of the material.

Parameters

  • mode

getEmissiveWrapT

getEmissiveWrapT()

Get the emissive wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setEmissiveWrapT

setEmissiveWrapT(mode)

Set the emissive wrap T mode of the material.

Parameters

  • mode

getEmissiveMagFilter

getEmissiveMagFilter()

Get the emissive magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setEmissiveMagFilter

setEmissiveMagFilter(filter)

Set the emissive magnification filter of the material.

Parameters

  • filter

getEmissiveMinFilter

getEmissiveMinFilter()

Get the emissive minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setEmissiveMinFilter

setEmissiveMinFilter(filter)

Set the emissive minification filter of the material.

Parameters

  • filter

getEmissiveAnisotropy

getEmissiveAnisotropy()

Get the emissive anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setEmissiveAnisotropy

setEmissiveAnisotropy(anisotropy)

Set the emissive anisotropy mode of the material.

Parameters

  • anisotropy

getSheenAmount

getSheenAmount()

Get the sheen amount of the material.

Returns

  • number: sheen value.

setSheenAmount

setSheenAmount(amount)

Set the sheen amount of the material.

Parameters

  • amount (number): The sheen value.

getSheenRoughness

getSheenRoughness()

Get the sheen roughness value of the material.

Returns

  • number: sheen roughness value.

setSheenRoughness

setSheenRoughness(amount)

Set the sheen roughness value of the material.

Parameters

  • amount (number): The sheen roughness value.

getSheenRoughnessMap

getSheenRoughnessMap()

Get the sheen roughness map of the material.

Returns

  • Texture: sheen roughness texture.

setSheenRoughnessMap

setSheenRoughnessMap(texture)

Set the sheen roughness map of the material.

Parameters

  • texture (Texture): Texture to use or nil.

getSheenRoughnessWrapS

getSheenRoughnessWrapS()

Get the sheen roughness wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setSheenRoughnessWrapS

setSheenRoughnessWrapS(mode)

Set the sheen roughness wrap S mode of the material.

Parameters

  • mode

getSheenRoughnessWrapT

getSheenRoughnessWrapT()

Get the sheen roughness wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setSheenRoughnessWrapT

setSheenRoughnessWrapT(mode)

Set the sheen roughness wrap T mode of the material.

Parameters

  • mode

getSheenRoughnessMagFilter

getSheenRoughnessMagFilter()

Get the sheen roughness magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setSheenRoughnessMagFilter

setSheenRoughnessMagFilter(filter)

Set the sheen roughness magnification filter of the material.

Parameters

  • filter

getSheenRoughnessMinFilter

getSheenRoughnessMinFilter()

Get the sheen roughness minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setSheenRoughnessMinFilter

setSheenRoughnessMinFilter(filter)

Set the sheen roughness minification filter of the material.

Parameters

  • filter

getSheenRoughnessAnisotropy

getSheenRoughnessAnisotropy()

Get the sheen roughness anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setSheenRoughnessAnisotropy

setSheenRoughnessAnisotropy(anisotropy)

Set the sheen roughness anisotropy mode of the material.

Parameters

  • anisotropy

getSheenColor

getSheenColor()

Get the sheen color of the material.

Returns

  • Color: sheen color.

setSheenColor

setSheenColor(color)

Set the sheen color of the material.

Parameters

  • color (Color): The sheen color.

getSheenColorMap

getSheenColorMap()

Get the sheen color map of the material.

Returns

  • Texture: sheen color texture.

setSheenColorMap

setSheenColorMap(texture)

Set the sheen color map of the material.

Parameters

  • texture (Texture): Texture to use or nil.

getSheenColorWrapS

getSheenColorWrapS()

Get the sheen color wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setSheenColorWrapS

setSheenColorWrapS(mode)

Set the sheen color wrap S mode of the material.

Parameters

  • mode

getSheenColorWrapT

getSheenColorWrapT()

Get the sheen color wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setSheenColorWrapT

setSheenColorWrapT(mode)

Set the sheen color wrap T mode of the material.

Parameters

  • mode

getSheenColorMagFilter

getSheenColorMagFilter()

Get the sheen color magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setSheenColorMagFilter

setSheenColorMagFilter(filter)

Set the sheen color magnification filter of the material.

Parameters

  • filter

getSheenColorMinFilter

getSheenColorMinFilter()

Get the sheen color minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setSheenColorMinFilter

setSheenColorMinFilter(filter)

Set the sheen color minification filter of the material.

Parameters

  • filter

getSheenColorAnisotropy

getSheenColorAnisotropy()

Get the sheen color anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setSheenColorAnisotropy

setSheenColorAnisotropy(anisotropy)

Set the sheen color anisotropy mode of the material.

Parameters

  • anisotropy

getNormalMap

getNormalMap()

Get the normal map texture of the material.

Returns

  • Texture: normal map texture.

setNormalMap

setNormalMap(texture)

Set the normal map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getNormalScale

getNormalScale()

Get the normal scale value of the material.

Returns

  • number: normal scale value.

setNormalScale

setNormalScale(scale)

Set the normal scale value of the material.

Parameters

  • scale (number): The normal scale value.

getNormalType

getNormalType()

Get the normal type of the material.

Returns

  • NormalType: normal type.

setNormalType

setNormalType(type)

Set the normal type of the material.

Parameters

getNormalWrapS

getNormalWrapS()

Get the normal wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setNormalWrapS

setNormalWrapS(mode)

Set the normal wrap S mode of the material.

Parameters

  • mode

getNormalWrapT

getNormalWrapT()

Get the normal wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setNormalWrapT

setNormalWrapT(mode)

Set the normal wrap T mode of the material.

Parameters

  • mode

getNormalMagFilter

getNormalMagFilter()

Get the normal magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setNormalMagFilter

setNormalMagFilter(filter)

Set the normal magnification filter of the material.

Parameters

  • filter

getNormalMinFilter

getNormalMinFilter()

Get the normal minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setNormalMinFilter

setNormalMinFilter(filter)

Set the normal minification filter of the material.

Parameters

  • filter

getNormalAnisotropy

getNormalAnisotropy()

Get the normal anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setNormalAnisotropy

setNormalAnisotropy(anisotropy)

Set the normal anisotropy mode of the material.

Parameters

  • anisotropy

getRoughnessIntensity

getRoughnessIntensity()

Get the roughness intensity value of the material.

Returns

  • number: roughness intensity value.

setRoughnessIntensity

setRoughnessIntensity(amount)

Set the roughness intensity value of the material.

Parameters

  • amount (number): The roughness intensity value.

getRoughnessMap

getRoughnessMap()

Get the roughness map texture of the material.

Returns

  • Texture: roughness map texture.

setRoughnessMap

setRoughnessMap(texture)

Set the roughness map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getRoughnessWrapS

getRoughnessWrapS()

Get the roughness wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setRoughnessWrapS

setRoughnessWrapS(mode)

Set the roughness wrap S mode of the material.

Parameters

  • mode

getRoughnessWrapT

getRoughnessWrapT()

Get the roughness wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setRoughnessWrapT

setRoughnessWrapT(mode)

Set the roughness wrap T mode of the material.

Parameters

  • mode

getRoughnessMagFilter

getRoughnessMagFilter()

Get the roughness magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setRoughnessMagFilter

setRoughnessMagFilter(filter)

Set the roughness magnification filter of the material.

Parameters

  • filter

getRoughnessMinFilter

getRoughnessMinFilter()

Get the roughness minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setRoughnessMinFilter

setRoughnessMinFilter(filter)

Set the roughness minification filter of the material.

Parameters

  • filter

getRoughnessAnisotropy

getRoughnessAnisotropy()

Get the roughness anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setRoughnessAnisotropy

setRoughnessAnisotropy(anisotropy)

Set the roughness anisotropy mode of the material.

Parameters

  • anisotropy

getMetalnessIntensity

getMetalnessIntensity()

Get the metalness intensity value of the material.

Returns

  • number: metalness intensity value.

setMetalnessIntensity

setMetalnessIntensity(amount)

Set the metalness intensity value of the material.

Parameters

  • amount (number): The metalness intensity value.

getMetalnessMap

getMetalnessMap()

Get the metalness map texture of the material.

Returns

  • Texture: metalness map texture.

setMetalnessMap

setMetalnessMap(texture)

Set the metalness map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getMetalnessWrapS

getMetalnessWrapS()

Get the metalness wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setMetalnessWrapS

setMetalnessWrapS(mode)

Set the metalness wrap S mode of the material.

Parameters

  • mode

getMetalnessWrapT

getMetalnessWrapT()

Get the metalness wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setMetalnessWrapT

setMetalnessWrapT(mode)

Set the metalness wrap T mode of the material.

Parameters

  • mode

getMetalnessMagFilter

getMetalnessMagFilter()

Get the metalness magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setMetalnessMagFilter

setMetalnessMagFilter(filter)

Set the metalness magnification filter of the material.

Parameters

  • filter

getMetalnessMinFilter

getMetalnessMinFilter()

Get the metalness minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setMetalnessMinFilter

setMetalnessMinFilter(filter)

Set the metalness minification filter of the material.

Parameters

  • filter

getMetalnessAnisotropy

getMetalnessAnisotropy()

Get the metalness anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setMetalnessAnisotropy

setMetalnessAnisotropy(anisotropy)

Set the metalness anisotropy mode of the material.

Parameters

  • anisotropy

getSpecularIntensity

getSpecularIntensity()

Get the specular intensity value of the material.

Returns

  • number: specular intensity value.

setSpecularIntensity

setSpecularIntensity(amount)

Set the specular intensity value of the material.

Parameters

  • amount (number): The specular intensity value.

getSpecularIntensityMap

getSpecularIntensityMap()

Get the specular intensity map texture of the material.

Returns

  • Texture: specular intensity map texture.

setSpecularIntensityMap

setSpecularIntensityMap(texture)

Set the specular intensity map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getSpecularIntensityWrapS

getSpecularIntensityWrapS()

Get the specular intensity wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setSpecularIntensityWrapS

setSpecularIntensityWrapS(mode)

Set the specular intensity wrap S mode of the material.

Parameters

  • mode

getSpecularIntensityWrapT

getSpecularIntensityWrapT()

Get the specular intensity wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setSpecularIntensityWrapT

setSpecularIntensityWrapT(mode)

Set the specular intensity wrap T mode of the material.

Parameters

  • mode

getSpecularIntensityMagFilter

getSpecularIntensityMagFilter()

Get the specular intensity magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setSpecularIntensityMagFilter

setSpecularIntensityMagFilter(filter)

Set the specular intensity magnification filter of the material.

Parameters

  • filter

getSpecularIntensityMinFilter

getSpecularIntensityMinFilter()

Get the specular intensity minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setSpecularIntensityMinFilter

setSpecularIntensityMinFilter(filter)

Set the specular intensity minification filter of the material.

Parameters

  • filter

getSpecularIntensityAnisotropy

getSpecularIntensityAnisotropy()

Get the specular intensity anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setSpecularIntensityAnisotropy

setSpecularIntensityAnisotropy(anisotropy)

Set the specular intensity anisotropy mode of the material.

Parameters

  • anisotropy

getSpecularColor

getSpecularColor()

Get the specular color of the material.

Returns

  • string: specular color value.

setSpecularColor

setSpecularColor(color)

Set the specular color of the material.

Parameters

  • color (string): The specular color value.

getSpecularColorMap

getSpecularColorMap()

Get the specular color map texture of the material.

Returns

  • Texture: specular color map texture.

setSpecularColorMap

setSpecularColorMap(texture)

Set the specular color map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getSpecularColorWrapS

getSpecularColorWrapS()

Get the specular color wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setSpecularColorWrapS

setSpecularColorWrapS(mode)

Set the specular color wrap S mode of the material.

Parameters

  • mode

getSpecularColorWrapT

getSpecularColorWrapT()

Get the specular color wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setSpecularColorWrapT

setSpecularColorWrapT(mode)

Set the specular color wrap T mode of the material.

Parameters

  • mode

getSpecularColorMagFilter

getSpecularColorMagFilter()

Get the specular color magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setSpecularColorMagFilter

setSpecularColorMagFilter(filter)

Set the specular color magnification filter of the material.

Parameters

  • filter

getSpecularColorMinFilter

getSpecularColorMinFilter()

Get the specular color minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setSpecularColorMinFilter

setSpecularColorMinFilter(filter)

Set the specular color minification filter of the material.

Parameters

  • filter

getSpecularColorAnisotropy

getSpecularColorAnisotropy()

Get the specular color anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setSpecularColorAnisotropy

setSpecularColorAnisotropy(anisotropy)

Set the specular color anisotropy mode of the material.

Parameters

  • anisotropy

getAmbientOcclusionMap

getAmbientOcclusionMap()

Get the ambient occlusion map texture of the material.

Returns

  • Texture: ambient occlusion map texture.

setAmbientOcclusionMap

setAmbientOcclusionMap(texture)

Set the ambient occlusion map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getAmbientOcclusionIntensity

getAmbientOcclusionIntensity()

Get the ambient occlusion intensity of the material.

Returns

  • string: ambient occlusion intensity value.

setAmbientOcclusionIntensity

setAmbientOcclusionIntensity(amount)

Set the ambient occlusion intensity of the material.

Parameters

  • amount (string): The ambient occlusion intensity value.

getAmbientOcclusionWrapS

getAmbientOcclusionWrapS()

Get the ambient occlusion wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setAmbientOcclusionWrapS

setAmbientOcclusionWrapS(mode)

Set the ambient occlusion wrap S mode of the material.

Parameters

  • mode

getAmbientOcclusionWrapT

getAmbientOcclusionWrapT()

Get the ambient occlusion wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setAmbientOcclusionWrapT

setAmbientOcclusionWrapT(mode)

Set the ambient occlusion wrap T mode of the material.

Parameters

  • mode

getAmbientOcclusionMagFilter

getAmbientOcclusionMagFilter()

Get the ambient occlusion magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setAmbientOcclusionMagFilter

setAmbientOcclusionMagFilter(filter)

Set the ambient occlusion magnification filter of the material.

Parameters

  • filter

getAmbientOcclusionMinFilter

getAmbientOcclusionMinFilter()

Get the ambient occlusion minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setAmbientOcclusionMinFilter

setAmbientOcclusionMinFilter(filter)

Set the ambient occlusion minification filter of the material.

Parameters

  • filter

getAmbientOcclusionAnisotropy

getAmbientOcclusionAnisotropy()

Get the ambient occlusion anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setAmbientOcclusionAnisotropy

setAmbientOcclusionAnisotropy(anisotropy)

Set the ambient occlusion anisotropy mode of the material.

Parameters

  • anisotropy

getClearcoatLevel

getClearcoatLevel()

Get the clearcoat level of the material.

Returns

  • string: clearcoat level value.

setClearcoatLevel

setClearcoatLevel(amount)

Set the clearcoat level of the material.

Parameters

  • amount (string): The clearcoat level value.

getClearcoatMap

getClearcoatMap()

Get the clearcoat map texture of the material.

Returns

  • Texture: clearcoat map texture.

setClearcoatMap

setClearcoatMap(texture)

Set the clearcoat map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getClearcoatWrapS

getClearcoatWrapS()

Get the clearcoat wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setClearcoatWrapS

setClearcoatWrapS(mode)

Set the clearcoat wrap S mode of the material.

Parameters

  • mode

getClearcoatWrapT

getClearcoatWrapT()

Get the clearcoat wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setClearcoatWrapT

setClearcoatWrapT(mode)

Set the clearcoat wrap T mode of the material.

Parameters

  • mode

getClearcoatMagFilter

getClearcoatMagFilter()

Get the clearcoat magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setClearcoatMagFilter

setClearcoatMagFilter(filter)

Set the clearcoat magnification filter of the material.

Parameters

  • filter

getClearcoatMinFilter

getClearcoatMinFilter()

Get the clearcoat minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setClearcoatMinFilter

setClearcoatMinFilter(filter)

Set the clearcoat minification filter of the material.

Parameters

  • filter

getClearcoatAnisotropy

getClearcoatAnisotropy()

Get the clearcoat anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setClearcoatAnisotropy

setClearcoatAnisotropy(anisotropy)

Set the clearcoat anisotropy mode of the material.

Parameters

  • anisotropy

getClearcoatNormalMap

getClearcoatNormalMap()

Get the clearcoat normal map texture of the material.

Returns

  • Texture: clearcoat normal map texture.

setClearcoatNormalMap

setClearcoatNormalMap(texture)

Set the clearcoat normal map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getClearcoatNormalScale

getClearcoatNormalScale()

Get the clearcoat normal scale of the material.

Returns

  • number: clearcoat normal scale value.

setClearcoatNormalScale

setClearcoatNormalScale(scale)

Set the clearcoat normal scale of the material.

Parameters

  • scale (number): The clearcoat normal scale value.

getClearcoatNormalWrapS

getClearcoatNormalWrapS()

Get the clearcoat normal wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setClearcoatNormalWrapS

setClearcoatNormalWrapS(mode)

Set the clearcoat normal wrap S mode of the material.

Parameters

  • mode

getClearcoatNormalWrapT

getClearcoatNormalWrapT()

Get the clearcoat normal wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setClearcoatNormalWrapT

setClearcoatNormalWrapT(mode)

Set the clearcoat normal wrap T mode of the material.

Parameters

  • mode

getClearcoatNormalMagFilter

getClearcoatNormalMagFilter()

Get the clearcoat normal magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setClearcoatNormalMagFilter

setClearcoatNormalMagFilter(filter)

Set the clearcoat normal magnification filter of the material.

Parameters

  • filter

getClearcoatNormalMinFilter

getClearcoatNormalMinFilter()

Get the clearcoat normal minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setClearcoatNormalMinFilter

setClearcoatNormalMinFilter(filter)

Set the clearcoat normal minification filter of the material.

Parameters

  • filter

getClearcoatNormalAnisotropy

getClearcoatNormalAnisotropy()

Get the clearcoat normal anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setClearcoatNormalAnisotropy

setClearcoatNormalAnisotropy(anisotropy)

Set the clearcoat normal anisotropy mode of the material.

Parameters

  • anisotropy

getClearcoatRoughnessMap

getClearcoatRoughnessMap()

Get the clearcoat roughness map texture of the material.

Returns

  • Texture: clearcoat roughness map texture.

setClearcoatRoughnessMap

setClearcoatRoughnessMap(texture)

Set the clearcoat roughness map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getClearcoatRoughnessIntensity

getClearcoatRoughnessIntensity()

Get the clearcoat roughness intensity of the material.

Returns

  • number: clearcoat roughness intensity value.

setClearcoatRoughnessIntensity

setClearcoatRoughnessIntensity(amount)

Set the clearcoat roughness intensity of the material.

Parameters

  • amount (number): The clearcoat roughness intensity value.

getClearcoatRoughnessWrapS

getClearcoatRoughnessWrapS()

Get the clearcoat roughness wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setClearcoatRoughnessWrapS

setClearcoatRoughnessWrapS(mode)

Set the clearcoat roughness wrap S mode of the material.

Parameters

  • mode

getClearcoatRoughnessWrapT

getClearcoatRoughnessWrapT()

Get the clearcoat roughness wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setClearcoatRoughnessWrapT

setClearcoatRoughnessWrapT(mode)

Set the clearcoat roughness wrap T mode of the material.

Parameters

  • mode

getClearcoatRoughnessMagFilter

getClearcoatRoughnessMagFilter()

Get the clearcoat roughness magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setClearcoatRoughnessMagFilter

setClearcoatRoughnessMagFilter(filter)

Set the clearcoat roughness magnification filter of the material.

Parameters

  • filter

getClearcoatRoughnessMinFilter

getClearcoatRoughnessMinFilter()

Get the clearcoat roughness minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setClearcoatRoughnessMinFilter

setClearcoatRoughnessMinFilter(filter)

Set the clearcoat roughness minification filter of the material.

Parameters

  • filter

getClearcoatRoughnessAnisotropy

getClearcoatRoughnessAnisotropy()

Get the clearcoat roughness anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setClearcoatRoughnessAnisotropy

setClearcoatRoughnessAnisotropy(anisotropy)

Set the clearcoat roughness anisotropy mode of the material.

Parameters

  • anisotropy

getReflectivity

getReflectivity()

Get the reflectivity of the material.

Returns

  • number: reflectivity value.

setReflectivity

setReflectivity(value)

Set the reflectivity of the material.

Parameters

  • value (number): The reflectivity value.

getIndexOfRefraction

getIndexOfRefraction()

Get the index of refraction of the material.

Returns

  • number: index of refraction value.

setIndexOfRefraction

setIndexOfRefraction(value)

Set the index of refraction of the material.

Parameters

  • value (number): The index of refraction value.

getEnvironmentMap

getEnvironmentMap()

Get the environment map texture of the material.

Returns

  • Texture: environment map texture.

setEnvironmentMap

setEnvironmentMap(texture)

Set the environment map texture of the material.

Parameters

  • texture (Texture): The texture to use or nil.

getEnvironmentIntensity

getEnvironmentIntensity()

Get the environment intensity of the material.

Returns

  • number: environment intensity value.

setEnvironmentIntensity

setEnvironmentIntensity(amount)

Set the environment intensity of the material.

Parameters

  • amount (number): The environment intensity value.

getThickness

getThickness()

Get the thickness value of the material.

Returns

  • number: thickness value.

setThickness

setThickness(amount)

Set the thickness value of the material.

Parameters

  • amount (number): The thickness value.

getThicknessMap

getThicknessMap()

Get the thickness map texture of the material.

Returns

  • string: thickness map texture.

setThicknessMap

setThicknessMap(texture)

Set the thickness map texture of the material.

Parameters

  • texture (string): The texture to use as the thickness map.

getThicknessWrapS

getThicknessWrapS()

Get the wrap mode for the S axis of the thickness texture.

Returns

  • string: wrap mode for the S axis.

setThicknessWrapS

setThicknessWrapS(mode)

Set the wrap mode for the S axis of the thickness texture.

Parameters

  • mode (string): The wrap mode for the S axis.

getThicknessWrapT

getThicknessWrapT()

Get the wrap mode for the T axis of the thickness texture.

Returns

  • string: wrap mode for the T axis.

setThicknessWrapT

setThicknessWrapT(mode)

Set the wrap mode for the T axis of the thickness texture.

Parameters

  • mode (string): The wrap mode for the T axis.

getThicknessMagFilter

getThicknessMagFilter()

Get the magnification filter for the thickness texture.

Returns

  • string: magnification filter.

setThicknessMagFilter

setThicknessMagFilter(filter)

Set the magnification filter for the thickness texture.

Parameters

  • filter (string): The magnification filter.

getThicknessMinFilter

getThicknessMinFilter()

Get the minification filter for the thickness texture.

Returns

  • string: minification filter.

setThicknessMinFilter

setThicknessMinFilter(filter)

Set the minification filter for the thickness texture.

Parameters

  • filter (string): The minification filter.

getThicknessAnisotropy

getThicknessAnisotropy()

Get the anisotropy level for the thickness texture.

Returns

  • string: anisotropy level.

setThicknessAnisotropy

setThicknessAnisotropy(anisotropy)

Set the anisotropy level for the thickness texture.

Parameters

  • anisotropy

getDisplacementMap

getDisplacementMap()

Get the displacement map texture of the material.

Returns

  • string: displacement map texture.

setDisplacementMap

setDisplacementMap(texture)

Set the displacement map texture of the material.

Parameters

  • texture (string): The texture to use as the displacement map.

getDisplacementScale

getDisplacementScale()

Get the displacement scale of the material.

Returns

  • number: displacement scale.

setDisplacementScale

setDisplacementScale(amount)

Set the displacement scale of the material.

Parameters

  • amount (number): The displacement scale value.

getDisplacementBias

getDisplacementBias()

Get the displacement bias of the material.

Returns

  • number: displacement bias.

setDisplacementBias

setDisplacementBias(amount)

Set the displacement bias of the material.

Parameters

  • amount (number): The displacement bias value.

getDisplacementWrapS

getDisplacementWrapS()

Get the wrap mode for the S axis of the displacement texture.

Returns

  • string: wrap mode for the S axis.

setDisplacementWrapS

setDisplacementWrapS(mode)

Set the wrap mode for the S axis of the displacement texture.

Parameters

  • mode (string): The wrap mode for the S axis.

getDisplacementWrapT

getDisplacementWrapT()

Get the wrap mode for the T axis of the displacement texture.

Returns

  • string: wrap mode for the T axis.

setDisplacementWrapT

setDisplacementWrapT(mode)

Set the wrap mode for the T axis of the displacement texture.

Parameters

  • mode (string): The wrap mode for the T axis.

getDisplacementMagFilter

getDisplacementMagFilter()

Get the magnification filter for the displacement texture.

Returns

  • string: magnification filter.

setDisplacementMagFilter

setDisplacementMagFilter(filter)

Set the magnification filter for the displacement texture.

Parameters

  • filter (string): The magnification filter.

getDisplacementMinFilter

getDisplacementMinFilter()

Get the minification filter for the displacement texture.

Returns

  • string: minification filter.

setDisplacementMinFilter

setDisplacementMinFilter(filter)

Set the minification filter for the displacement texture.

Parameters

  • filter (string): The minification filter.

getDisplacementAnisotropy

getDisplacementAnisotropy()

Get the anisotropy level for the displacement texture.

Returns

  • string: anisotropy level.

setDisplacementAnisotropy

setDisplacementAnisotropy(anisotropy)

Set the anisotropy level for the displacement texture.

Parameters

  • anisotropy

getTransmissionMap

getTransmissionMap()

Get the transmission map texture of the material.

Returns

  • string: transmission map texture.

setTransmissionMap

setTransmissionMap(texture)

Set the transmission map texture of the material.

Parameters

  • texture (string): The texture to use as the transmission map.

getTransmission

getTransmission()

Get the transmission value of the material.

Returns

  • number: transmission value.

setTransmission

setTransmission(amount)

Set the transmission value of the material.

Parameters

  • amount (number): The transmission value to set.

getTransmissionWrapS

getTransmissionWrapS()

Get the wrap mode for the S axis of the transmission texture.

Returns

  • string: wrap mode for the S axis.

setTransmissionWrapS

setTransmissionWrapS(mode)

Set the wrap mode for the S axis of the transmission texture.

Parameters

  • mode (string): The wrap mode for the S axis.

getTransmissionWrapT

getTransmissionWrapT()

Get the wrap mode for the T axis of the transmission texture.

Returns

  • string: wrap mode for the T axis.

setTransmissionWrapT

setTransmissionWrapT(mode)

Set the wrap mode for the T axis of the transmission texture.

Parameters

  • mode (string): The wrap mode for the T axis.

getTransmissionMagFilter

getTransmissionMagFilter()

Get the magnification filter for the transmission texture.

Returns

  • string: magnification filter.

setTransmissionMagFilter

setTransmissionMagFilter(filter)

Set the magnification filter for the transmission texture.

Parameters

  • filter (string): The magnification filter.

getTransmissionMinFilter

getTransmissionMinFilter()

Get the minification filter for the transmission texture.

Returns

  • string: minification filter.

setTransmissionMinFilter

setTransmissionMinFilter(filter)

Set the minification filter for the transmission texture.

Parameters

  • filter (string): The minification filter.

getTransmissionAnisotropy

getTransmissionAnisotropy()

Get the anisotropy level for the transmission texture.

Returns

  • string: anisotropy level.

setTransmissionAnisotropy

setTransmissionAnisotropy(anisotropy)

Set the anisotropy level for the transmission texture.

Parameters

  • anisotropy

getBlending

getBlending()

Get the blending status of the material.

Returns

  • boolean: if blending is enabled, false otherwise.

setBlending

setBlending(enabled)

Enable or disable blending for the material.

Parameters

  • enabled (boolean): True to enable blending, false to disable.

getBlendSource

getBlendSource()

Get the source factor for the blending equation.

Returns

  • BlendSource: source factor for the blending equation.

setBlendSource

setBlendSource(value)

Set the source factor for the blending equation.

Parameters

  • value (BlendSource): The source factor for the blending equation.

getBlendDest

getBlendDest()

Get the destination factor for the blending equation.

Returns

  • BlendDest: destination factor for the blending equation.

setBlendDest

setBlendDest(value)

Set the destination factor for the blending equation.

Parameters

  • value (BlendDest): The destination factor for the blending equation.

getBlendEquation

getBlendEquation()

Get the equation to use for blending.

Returns

  • string: equation used for blending.

setBlendEquation

setBlendEquation(value)

Set the equation to use for blending.

Parameters

  • value (string): The equation to use for blending.

getDepthTest

getDepthTest()

Get the depth test status for the material.

Returns

  • boolean: if depth testing is enabled, false otherwise.

setDepthTest

setDepthTest(enabled)

Enable or disable depth testing for the material.

Parameters

  • enabled (boolean): True to enable depth testing, false to disable.

getDepthMode

getDepthMode()

Get the depth mode for the material.

Returns

  • string: current depth mode of the material.

setDepthMode

setDepthMode(mode)

Set the depth mode for the material.

Parameters

  • mode (string): The desired depth mode for the material.

getCulling

getCulling()

Get the culling mode for the material.

Returns

  • string: current culling mode of the material.

setCulling

setCulling(mode)

Set the culling mode for the material.

Parameters

  • mode (string): The desired culling mode for the material.

getPoints

getPoints()

Check if the material is set to render as points.

Returns

  • boolean: if the material renders as points, false otherwise.

setPoints

setPoints(enabled)

Enable or disable rendering the material as points.

Parameters

  • enabled (boolean): True to render as points, false otherwise.

getPointSize

getPointSize()

Get the point size for the material when rendering as points.

Returns

  • number: point size used when rendering as points.

setPointSize

setPointSize(size)

Set the point size for the material when rendering as points.

Parameters

  • size (number): The desired point size.

getPointSizeAttenuation

getPointSizeAttenuation()

Check if point size attenuation is enabled for the material.

Returns

  • boolean: if point size attenuation is enabled, false otherwise.

setPointSizeAttenuation

setPointSizeAttenuation(enabled)

Enable or disable point size attenuation for the material.

Parameters

  • enabled (boolean): True to enable point size attenuation, false to disable.

getVertexColors

getVertexColors()

Check if point vertex colors are enabled for the material.

Returns

  • boolean: if vertex colors are enabled, false otherwise.

setVertexColors

setVertexColors(enabled)

Enable or disable vertex colors for the material.

Parameters

  • enabled (boolean): True to enable vertex colors, false to disable.

getFlatShading

getFlatShading()

Check if flat shading is enabled for the material.

Returns

  • boolean: if flat shading is enabled, false otherwise.

setFlatShading

setFlatShading(enabled)

Enable or disable flat shading for the material.

Parameters

  • enabled (boolean): True to enable flat shading, false to disable.

getWireframe

getWireframe()

Check if wireframe is enabled for the material.

Returns

  • boolean: if wireframe is enabled, false otherwise.

setWireframe

setWireframe(enabled)

Enable or disable wireframe for the material.

Parameters

  • enabled (boolean): True to enable wireframe, false to disable.

getGradientMap

getGradientMap()

Get the gradient map of the material.

Returns

  • Texture: gradient map texture.

setGradientMap

setGradientMap(texture)

Set the gradient map of the material.

Parameters

  • texture (Texture): The gradient map texture.

getGradientWrapS

getGradientWrapS()

Get the gradient wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setGradientWrapS

setGradientWrapS(mode)

Set the gradient wrap S mode of the material.

Parameters

  • mode

getGradientWrapT

getGradientWrapT()

Get the gradient wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setGradientWrapT

setGradientWrapT(mode)

Set the gradient wrap T mode of the material.

Parameters

  • mode

getGradientMagFilter

getGradientMagFilter()

Get the gradient magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setGradientMagFilter

setGradientMagFilter(filter)

Set the gradient magnification filter of the material.

Parameters

  • filter

getGradientMinFilter

getGradientMinFilter()

Get the gradient minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setGradientMinFilter

setGradientMinFilter(filter)

Set the gradient minification filter of the material.

Parameters

  • filter

getGradientAnisotropy

getGradientAnisotropy()

Get the gradient anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setGradientAnisotropy

setGradientAnisotropy(anisotropy)

Set the gradient anisotropy mode of the material.

Parameters

  • anisotropy

getMatcapMap

getMatcapMap()

Get the matcap map of the material.

Returns

  • Texture: matcap map texture.

setMatcapMap

setMatcapMap(texture)

Set the matcap map of the material.

Parameters

  • texture (Texture): The matcap map texture.

getMatcapWrapS

getMatcapWrapS()

Get the matcap wrap S mode of the material.

Returns

  • WrapMode: wrap mode.

setMatcapWrapS

setMatcapWrapS(mode)

Set the matcap wrap S mode of the material.

Parameters

  • mode

getMatcapWrapT

getMatcapWrapT()

Get the matcap wrap T mode of the material.

Returns

  • WrapMode: wrap mode.

setMatcapWrapT

setMatcapWrapT(mode)

Set the matcap wrap T mode of the material.

Parameters

  • mode

getMatcapMagFilter

getMatcapMagFilter()

Get the matcap magnification filter of the material.

Returns

  • MagFilter: magnification filter mode.

setMatcapMagFilter

setMatcapMagFilter(filter)

Set the matcap magnification filter of the material.

Parameters

  • filter

getMatcapMinFilter

getMatcapMinFilter()

Get the matcap minification filter of the material.

Returns

  • MinFilter: minification filter mode.

setMatcapMinFilter

setMatcapMinFilter(filter)

Set the matcap minification filter of the material.

Parameters

  • filter

getMatcapAnisotropy

getMatcapAnisotropy()

Get the matcap anisotropy mode of the material.

Returns

  • Anisotropy: anisotropy mode.

setMatcapAnisotropy

setMatcapAnisotropy(anisotropy)

Set the matcap anisotropy mode of the material.

Parameters

  • anisotropy

getShininess

getShininess()

Get the shininess of a phong material.

Returns

  • number: shininess of the material.

setShininess

setShininess(shininess)

Set the shininess of a phong material.

Parameters

  • shininess (number): The desired shininess.

setUniform

setUniform(name, value)

Set a uniform to a value. value has to be of type number, Vector2/3/4, Quaternion, Color or Matrix with 3x3 or 4x4 values

Parameters

  • name (string): name of the uniform
  • value (any): value of the uniform

Enum: MaterialType

Material type enumeration Enumeration of available material types

Field Name Description
Physical string: Physically-Based Rendering material
Shader string: Custom GLSL shader material
Point string: Point/particle rendering material
Basic string: Unlit material with basic properties
Normal string: Normal visualization material
Toon string: Cel/toon shading material
Matcap string: Material capture shading material
Lambert string: Basic diffuse shading material
Phong string: Specular Phong shading material

Enum: TextureWrapping

Texture wrapping modes Enumeration of texture wrapping modes

Field Name Description
Repeat string: Repeat texture beyond UV [0,1] range
ClampToEdge string: Clamp texture coordinates to edge
MirroredRepeat string: Repeat texture with mirroring

Enum: MagFilter

Magnification filter modes Enumeration of texture magnification filter modes

Field Name Description
Linear string: Linear interpolation filtering
Nearest string: Nearest neighbor filtering

Enum: MinFilter

Minification filter modes Enumeration of texture minification filter modes

Field Name Description
Nearest string: Nearest neighbor filtering
NearestMipmapNearest string: Nearest neighbor with nearest mipmap
NearestMipmapLinear string: Nearest neighbor with linear mipmap
Linear string: Linear interpolation filtering
LinearMipmapNearest string: Linear interpolation with nearest mipmap
LinearMipmapLinear string: Linear interpolation with linear mipmap (trilinear)

Enum: WrapMode

Enumeration of available wrap modes.

Field Name Description
Repeat string: Texture coordinates repeat
ClampToEdge string: Texture coordinates clamp to edge
MirroredRepeat string: Texture coordinates mirror and then repeat

Enum: Anisotropy

Anisotropic filtering levels Enumeration of anisotropic filtering levels

Field Name Description
x1 string: 1x anisotropy (disabled)
x2 string: 2x anisotropic filtering
x4 string: 4x anisotropic filtering
x8 string: 8x anisotropic filtering
x16 string: 16x anisotropic filtering

Enum: BlendingMode

Blending modes Enumeration of material blending modes

Field Name Description
None string: No blending (opaque)
Normal string: Normal alpha blending
Additive string: Additive blending
Subtractive string: Subtractive blending
Multiply string: Multiply blending
Custom string: Custom blending equation

Enum: BlendFactor

Blend factor sources Enumeration of blend factor sources

Field Name Description
Zero string: Zero factor
One string: One factor
SourceColor string: Source color factor
OneMinusSourceColor string: One minus source color factor
SourceAlpha string: Source alpha factor
OneMinusSourceAlpha string: One minus source alpha factor
DestinationAlpha string: Destination alpha factor
OneMinusDestinationAlpha string: One minus destination alpha factor
DestinationColor string: Destination color factor
OneMinusDestinationColor string: One minus destination color factor
SourceAlphaSaturate string: Source alpha saturate factor (src only)

Enum: BlendSource

Enumeration of available blend sources.

Field Name Description
Zero string: zero source
One string: one source
SourceColor string: source color
OneMinusSourceColor string: one minus source color
SourceAlpha string: source alpha
OneMinusSourceAlpha string: one minus source alpha
DestinationAlpha string: destination alpha
OneMinusDestinationAlpha string: one minus destination alpha
DestinationColor string: destination color
OneMinusDestinationColor string: one minus destination color
SourceAlphaSaturate string: source alpha saturate

Enum: BlendDest

Enumeration of available blend destinations. Similar to BlendSource, represents the possible blending destinations.

Field Name Description

Enum: BlendEquation

Blend equations Enumeration of blend equations

Field Name Description
Add string: Add source and destination
Subtract string: Subtract destination from source
ReverseSubtract string: Subtract source from destination
Min string: Minimum of source and destination
Max string: Maximum of source and destination

Enum: CullingMode

Culling modes Enumeration of polygon culling modes

Field Name Description
Front string: Cull front-facing polygons
Back string: Cull back-facing polygons
Off string: No polygon culling

Enum: DepthMode

Depth test modes Enumeration of depth test comparison modes

Field Name Description
Never string: Never pass depth test
Always string: Always pass depth test
Less string: Pass if depth is less
LessEqual string: Pass if depth is less or equal
GreaterEqual string: Pass if depth is greater or equal
Greater string: Pass if depth is greater
NotEqual string: Pass if depth is not equal

Enum: NormalType

Normal map types Enumeration of normal map coordinate spaces

Field Name Description
TangentSpace string: Tangent-space normal map
ObjectSpace string: Object-space normal map

Enum: SurfaceEnvironmentCombination

Environment combination modes Enumeration of environment map combination modes

Field Name Description
Multiply string: Multiply surface color with environment
Mix string: Mix between surface and environment using reflectivity
Add string: Add environment to surface color

Enum: SheenAttributes

Sheen attributes (for Physical materials) Enumeration of sheen material property names

Field Name Description
Sheen string: Sheen intensity attribute name
SheenRoughness string: Sheen roughness attribute name
SheenColor string: Sheen color attribute name

Enum: ClearcoatAttributes

Clearcoat attributes (for Physical materials) Enumeration of clearcoat material property names

Field Name Description
ClearcoatLevel string: Clearcoat intensity attribute name
ClearcoatRoughness string: Clearcoat roughness attribute name
ClearcoatNormalScale string: Clearcoat normal scale attribute name

Enum: TransmissionAttributes

Transmission attributes (for Physical materials) Enumeration of transmission material property names

Field Name Description
Transmission string: Transmission intensity attribute name
IndexOfRefraction string: Index of refraction attribute name

Enum: SpecularAttributes

Specular attributes (common to multiple material types) Enumeration of specular material property names

Field Name Description
SpecularIntensity string: Specular intensity attribute name
SpecularColor string: Specular color attribute name
Shininess string: Shininess attribute name (Phong only)
Reflectivity string: Reflectivity attribute name

Enum: EmissionAttributes

Emission attributes (common to multiple material types) Enumeration of emissive material property names

Field Name Description
EmissiveColor string: Emission color attribute name
EmissiveIntensity string: Emission intensity attribute name

Enum: DisplacementAttributes

Displacement attributes (common to multiple material types) Enumeration of displacement mapping property names

Field Name Description
DisplacementScale string: Displacement scale attribute name
DisplacementBias string: Displacement bias attribute name

Enum: AmbientOcclusionAttributes

Ambient occlusion attributes (common to multiple material types) Enumeration of ambient occlusion property names

Field Name Description
AmbientOcclusionIntensity string: Ambient occlusion intensity attribute name

Enum: LightmapAttributes

Lightmap attributes (common to multiple material types) Enumeration of lightmap property names

Field Name Description
LightMapIntensity string: Lightmap intensity attribute name

Enum: PointAttributes

Point rendering attributes Enumeration of point material property names

Field Name Description
PointSize string: Point size attribute name
PointSizeAttenuation string: Point size attenuation attribute name

Enum: ToonAttributes

Toon shading attributes Enumeration of toon shading property names

Field Name Description
Gradient string: Gradient ramp attribute name

Enum: MatcapAttributes

Matcap shading attributes Enumeration of matcap shading property names

Field Name Description
Matcap string: Matcap texture attribute name

Enum: ShaderAttributes

Shader material attributes Enumeration of custom shader property names

Field Name Description
VertexShader string: Vertex shader attribute name
PixelShader string: Pixel shader attribute name

Enum: BasicAttributes

Basic material attributes Enumeration of basic material property names

Field Name Description
EmissionColor string: Emission color attribute name (Basic material)
RefractionRatio string: Refraction ratio attribute name

Enum: TextureAttributeType

Texture attribute types (for runtime checks) Enumeration of texture attribute types

Field Name Description
Albedo string: Albedo/diffuse texture
Normal string: Normal map texture
Roughness string: Roughness map texture
Metalness string: Metalness map texture
Emissive string: Emissive texture
AmbientOcclusion string: Ambient occlusion texture
Alpha string: Alpha mask texture
SpecularMap string: Specular map texture
SpecularIntensityMap string: Specular intensity map
SpecularColorMap string: Specular color map
SheenRoughnessMap string: Sheen roughness map
SheenColorMap string: Sheen color map
Clearcoat string: Clearcoat texture
ClearcoatNormalMap string: Clearcoat normal map
ClearcoatRoughnessMap string: Clearcoat roughness map
TransmissionMap string: Transmission map
Environment string: Environment map (HDR)
ThicknessMap string: Thickness map
Displacement string: Displacement map
LightMap string: Light map texture
Matcap string: Matcap texture
Gradient string: Gradient ramp texture

Core Enumerations

Texture Enumerations

Rendering Enumerations

Material Property Enumerations

Attribute Enumerations

These tables group related attribute names for programmatic access: