Skip to content

Class: Material

Material represents how something is displayed and rendered, specifying shaders, textures and colors.

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

+ new Material(options?: IMaterialOptions): Material

Parameters:

Name Type
options IMaterialOptions

Returns: Material

Properties

color

color: Color

The color to apply, if there is a texture the texture output is mixed this color, if there is no texture the color is used directly.


shaders

shaders: string[]

List of shaders to apply.


texture

Optional texture: undefined | Texture

The texture to apply.

Methods

Copy

Copy(): Material

Makes a value copy of the material.

Returns: Material


Free

Free(): void

Free releases an object or it's constituent parts back into any available object pools.

Returns: void

Implementation of: IFreeable