The MaterialBase
class exposes properties common to all material types.
Inherited By : BlendedMaterial
, BlendShapeToWarpMapMaterial
, ColorPaintMaterial
, ComposedMaterial
, DefaultMaterial
, MetallicRoughnessPbrMaterial
, RetouchingMaterial
Property | Description |
---|---|
alphaCutoff | (get) alphaCutoff: ScalarSignal Specifies a number between 0.0 and 1.0. |
alphaTestEnabled | (get) 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> Specifies the material cull mode. |
depthTestEnabled | (get) 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 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) Specifies the texture that forms the basis of this material. |
diffuseTextureTransform | (get) diffuseTextureTransform: TextureTransform Specifies the coordinates transform of the diffuse texture of this material. |
doubleSided | (get) 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 Specifies the unique identifier for the material. |
name | (get) name: string 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 Specifies a number between 0.0 and 1.0 indicating the opacity threshold for discarding pixels. 0 is transparent and 1 is opaque. |
Method | Description |
---|---|
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. |