Hide menu
Loading...
Searching...
No Matches
VisualMaterial

Base class for all visual materials.

Extends

Extended by

Constructors

Constructor

new VisualMaterial(opacity?): VisualMaterial

Creates a visual material.

If opacity is provided, it is clamped to the [0, 1] range. Otherwise, the default opacity is 1.

Parameters

opacity?

number

Material opacity.

Returns

VisualMaterial

Overrides

BaseObject.constructor

Accessors

id

Get Signature

get id(): bigint

Returns the unique identifier of the object.

Returns

bigint

Inherited from

BaseObject.id


opacity

Get Signature

get opacity(): number

Returns the material opacity.

Returns

number

Set Signature

set opacity(opacity): void

Sets the material opacity. The value is clamped to the [0, 1] range.

Parameters

opacity

number

Material opacity.

Returns

void

Methods

clone()

abstract clone(): VisualMaterial

Creates a new material with the same properties as this material.

Returns

VisualMaterial


copy()

copy(other): this

Copies the properties of another visual material to this material.

Parameters

other

VisualMaterial

Source material.

Returns

this