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 provides 3 methods for working with Material objects in Typescript programs.
Available methods include: constructor, getTexture, setTexture.
All 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.
Description
Material is a class in the Aspose.3D FOSS library for TypeScript that exposes 2 methods and 5 properties for programmatic use. It extends A3DObject, inheriting shared functionality from its parent type.
Core capabilities include: Creates a new material with the given name or null; sets the texture value. These operations enable developers to integrate material functionality directly into TypeScript applications.
The class also provides the MAP_SPECULAR property (gets the map specular), the MAP_DIFFUSE property (gets the map diffuse), the MAP_EMISSIVE property (gets the map emissive).
Instances are created through a single constructor that initializes the object with default values.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
MAP_SPECULAR | `` | Read | Gets the map specular. |
MAP_DIFFUSE | `` | Read | Gets the map diffuse. |
MAP_EMISSIVE | `` | Read | Gets the map emissive. |
MAP_AMBIENT | `` | Read | Gets the map ambient. |
MAP_NORMAL | `` | Read | Gets the map normal. |
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. |