MaterialsModule Overview
MaterialsModule Overview
MaterialBase

MaterialBase

The MaterialBase class exposes properties common to all material types.

Inherited By : BlendedMaterial, BlendShapeToWarpMapMaterial, ColorPaintMaterial, ComposedMaterial, DefaultMaterial, MetallicRoughnessPbrMaterial, RetouchingMaterial

Properties

PropertyDescription
alphaCutoff
(get) alphaCutoff: ScalarSignal
(set) alphaCutoff: ScalarSignal


Specifies a number between 0.0 and 1.0.
alphaTestEnabled
(get) alphaTestEnabled: BoolSignal
(set) alphaTestEnabled: BoolSignal


Specifies a boolean value that represents whether alpha testing is enabled on this material or not.
If alpha testing is enabled - when opacity is passing the threshold determined by alphaCutoff - the rendered output is going to be fully transparent.
cullMode
(get) cullMode: StringSignal<MaterialsModule.CullMode>
(set) cullMode: StringSignal<MaterialsModule.CullMode>


Specifies the material cull mode.
depthTestEnabled
(get) depthTestEnabled: BoolSignal
(set) depthTestEnabled: BoolSignal


Specifies a boolean value that represents whether depth testing is enabled.
When enabled, any scene object using this material will be obscured by nearer objects
that have already depthWriteEnabled set.
depthWriteEnabled
(get) depthWriteEnabled: BoolSignal
(set) depthWriteEnabled: BoolSignal


Specifies a boolean value that represents whether depth writing is enabled.
When enabled, any scene object using this material will always draw over any other object.
They will obscure farther objects that are drawn after, unless these objects also have depthWriteEnabled set to true.
diffuse
(get) (Not Available)
(set) diffuse: TextureBase | null


Specifies the texture that forms the basis of this material.
diffuseTextureTransform
(get) diffuseTextureTransform: TextureTransform
(set) diffuseTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the diffuse texture of this material.
doubleSided
(get) doubleSided: BoolSignal
(set) doubleSided: BoolSignal


Indicates whether the material can be seen from both sides when rendering the scene.
Note: When FALSE, only the side specified by object's Cull Mode is rendered.
identifier
(get) identifier: string
(set) (Not Available)


Specifies the unique identifier for the material.
name
(get) name: string
(set) (Not Available)


Specifies the unique identifier for the material name. This value is specified in AR Studio at design time.
See Also: MaterialsModule.get.
opacity
(get) opacity: ScalarSignal
(set) opacity: ScalarSignal


Specifies a number between 0.0 and 1.0 indicating the opacity threshold for discarding pixels. 0 is transparent and 1 is opaque.

Methods

MethodDescription
getDiffuse
getDiffuse(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
setTextureSlot
setTextureSlot(textureSlotName: string, signal: ShaderSignal): void


Assigns a ShaderSignal to the specified texture slot.

Was this article helpful?