Material

Overview

Material is a class in Aspose.3d for Typescript. Inherits from: Material, A3DObject.

Material.getTexture(slotName) returns the texture assigned to the specified slot, and Material.setTexture(slotName, texture) assigns a texture to that slot.

Properties

NameTypeAccessDescription
MAP_SPECULAR``ReadIs the constant name for the specular texture map slot
MAP_DIFFUSE``ReadIs the constant name for the diffuse texture map slot
MAP_EMISSIVE``ReadIs the constant name for the emissive texture map slot
MAP_AMBIENT``ReadIs the constant name for the ambient texture map slot
MAP_NORMAL``ReadIs the constant name for the normal (bump) texture map slot

Methods

SignatureDescription
constructor(name: string | null)Creates a material instance with the specified name or null
getTexture(_slotName: string)TextureBase | nullReturns the texture assigned to the specified slot, and Material.setTexture(slotName, texture) assigns a texture to that slot
setTexture(_slotName: string, _texture: TextureBase)Assigns the provided texture to the specified slot name