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

NameTypeAccessDescription
MAP_SPECULAR``ReadGets the map specular.
MAP_DIFFUSE``ReadGets the map diffuse.
MAP_EMISSIVE``ReadGets the map emissive.
MAP_AMBIENT``ReadGets the map ambient.
MAP_NORMAL``ReadGets the map normal.

Methods

SignatureDescription
constructor(name: string | null)Creates a new material with the given name or null
getTexture(_slotName: string)TextureBase | nullReturns the texture assigned to the specified slot name or null
setTexture(_slotName: string, _texture: TextureBase)Sets the texture value.

See Also

 English