Hide menu
Loading...
Searching...
No Matches
BasicMaterial

Defines a basic material with a single color.

Extends

Constructors

Constructor

new BasicMaterial(color?, opacity?): BasicMaterial

Creates a basic material.

By default, the material uses opaque black color and opacity 1.

Parameters

color?

Color = ...

Material color.

opacity?

number

Material opacity.

Returns

BasicMaterial

Overrides

VisualMaterial.constructor

Accessors

color

Get Signature

get color(): Color

Returns the material color.

Returns

Color

Set Signature

set color(color): void

Sets the material color. Component values are copied from the provided color.

Parameters

color

Color

Material color.

Returns

void


id

Get Signature

get id(): bigint

Returns the unique identifier of the object.

Returns

bigint

Inherited from

VisualMaterial.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

Inherited from

VisualMaterial.opacity

Methods

clone()

clone(): BasicMaterial

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

Returns

BasicMaterial

Overrides

VisualMaterial.clone


copy()

copy(other): this

Copies the properties of another basic material to this material.

Parameters

other

BasicMaterial

Source material.

Returns

this

Overrides

VisualMaterial.copy