Scripting API
MaterialsModule
DefaultMaterial

DefaultMaterial

The DefaultMaterial class encapsulates an image-based material.

Inherits From : MaterialBase

Properties

PropertyDescription
ambientColorFactor
(get) ambientColorFactor: RgbaSignal
(set) ambientColorFactor: ColorSignal


Specifies a ColorSignal for a ambient color factor. A ColorSignal may be created using the RGBA() and HSVA() methods of the Reactive module.
Note that RgbaSignal is always returned.
See Also: ReactiveModule.RGBA and ReactiveModule.HSVA.
blendMode
(get) blendMode: StringSignal<MaterialsModule.BlendMode>
(set) blendMode: StringSignal<MaterialsModule.BlendMode>


Specifies the material blend mode.
diffuseColorFactor
(get) diffuseColorFactor: RgbaSignal
(set) diffuseColorFactor: ColorSignal


Specifies a ColorSignal for a diffuse color factor. A ColorSignal may be created using the RGBA() and HSVA() methods of the Reactive module.
Note that RgbaSignal is always returned.
See Also: ReactiveModule.RGBA and ReactiveModule.HSVA.
emissive
(get) (Not Available)
(set) emissive: TextureBase | null


Specifies the emissive texture of the material.
emissiveColorFactor
(get) emissiveColorFactor: RgbaSignal
(set) emissiveColorFactor: ColorSignal


Specifies a ColorSignal for a emmisive color factor. A ColorSignal may be created using the RGBA() and HSVA() methods of the Reactive module.
Note that RgbaSignal is always returned.
See Also: ReactiveModule.RGBA and ReactiveModule.HSVA.
emissiveTextureTransform
(get) emissiveTextureTransform: TextureTransform
(set) emissiveTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the emissive texture of this material.
multiply
(get) (Not Available)
(set) multiply: TextureBase | null


Specifies the multiplicative texture of the material.
multiplyTextureTransform
(get) multiplyTextureTransform: TextureTransform
(set) multiplyTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the multiplicative texture of this material.
normalTextureScale
(get) normalTextureScale: ScalarSignal
(set) normalTextureScale: ScalarSignal


The scalar parameter applied to each normal vector of the texture. This value scales the normal vector in X and Y directions.
reflective
(get) (Not Available)
(set) reflective: TextureBase | null


Specifies the reflective texture of the material.
reflectiveTextureTransform
(get) reflectiveTextureTransform: TextureTransform
(set) reflectiveTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the reflective texture of this material.
specularColorFactor
(get) specularColorFactor: RgbaSignal
(set) specularColorFactor: ColorSignal


Specifies a ColorSignal for a specular color factor. A ColorSignal may be created using the RGBA() and HSVA() methods of the Reactive module.
Note that RgbaSignal is always returned.
See Also: ReactiveModule.RGBA and ReactiveModule.HSVA.

Methods

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


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getMultiply
getMultiply(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getReflective
getReflective(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.