Hide menu
Loading...
Searching...
No Matches
PhongMaterial

Defines phong material.

Extends

Constructors

new PhongMaterial()

new PhongMaterial(ambientColor, diffuseColor, specularColor, emissionColor, shininess?, opacity?): PhongMaterial

Parameters

ambientColor

Color = ...

Ambient color.

diffuseColor

Color = ...

Diffuse color.

specularColor

Color = ...

Specular color.

emissionColor

Color = ...

Emissive color.

shininess?

number

Shininess value.

opacity?

number

Material opacity.

Returns

PhongMaterial

Overrides

VisualMaterial.constructor

Properties

ambientColor

ambientColor: Color

Ambient color.


diffuseColor

diffuseColor: Color

Diffuse color.


emissionColor

emissionColor: Color

Emissive color.


specularColor

specularColor: Color

Specular color.

Accessors

id

Get Signature

get id(): bigint

Returns object id.

Returns

bigint

Inherited from

VisualMaterial.id


opacity

Get Signature

get opacity(): number

Returns material opacity.

Returns

number

Set Signature

set opacity(opacity): void

Sets material opacity. Value should be in [0, 1] range.

Parameters

opacity

number

Opacity.

Returns

void

Inherited from

VisualMaterial.opacity


shininess

Get Signature

get shininess(): number

Returns material shininess.

Returns

number

Set Signature

set shininess(shininess): void

Sets material shininess. Value should be in [0, 128] range.

Parameters

shininess

number

Shininess.

Returns

void

Methods

clone()

clone(): PhongMaterial

Creates new PhongMaterial same as this.

Returns

PhongMaterial

Overrides

VisualMaterial.clone


copy()

copy(other): this

Copies the components of the other material to this.

Parameters

other

PhongMaterial

Copied object.

Returns

this

Overrides

VisualMaterial.copy