Material
Overview
Material is a class in Aspose.3D FOSS for TypeScript.
Inherits from: A3DObject.
Material.constructor creates a new material with the given name or null.
This class declares 9 methods for Material objects in TypeScript programs.
Available methods include: constructor, findProperty, getProperty, getTexture, removeProperty, setProperty, setTexture, toString.
Public members are accessible to any TypeScript application after installing the Aspose.3D FOSS for TypeScript package.
Properties: MAP_AMBIENT, MAP_DIFFUSE, MAP_EMISSIVE, MAP_NORMAL, MAP_SPECULAR, name, and 1 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
MAP_SPECULAR | `` | Read/Write | Gets or sets the map specular. |
MAP_DIFFUSE | `` | Read/Write | Gets or sets the map diffuse. |
MAP_EMISSIVE | `` | Read/Write | Gets or sets the map emissive. |
MAP_AMBIENT | `` | Read/Write | Gets or sets the map ambient. |
MAP_NORMAL | `` | Read/Write | Gets or sets the map normal. |
name | string | Read/Write | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
constructor(name: string | null) | Creates a new material with the given name or null |
getTexture(_slotName: string) → TextureBase | null | Returns the texture assigned to the specified slot name or null |
setTexture(_slotName: string, _texture: TextureBase) | Sets the texture value. |
constructor(name: string) | Calls constructor(name) on this Material instance. |
findProperty(propertyName: string) → Property | null | Calls findProperty(propertyName) on this Material instance. |
getProperty(property: string) → any | Calls getProperty(property) on this Material instance. |
setProperty(property: string, value: any) | Sets the property value. |
removeProperty(property: string | Property) → boolean | Calls removeProperty(property) on this Material instance. |
toString() → string | Calls toString on this Material instance. |