Defines a material based on the Phong reflection model.
new PhongMaterial(
ambientColor?,diffuseColor?,specularColor?,emissionColor?,shininess?,opacity?):PhongMaterial
Creates a Phong material.
Default values correspond to a neutral opaque material with shininess 30.
Color = ...
Ambient color.
Color = ...
Diffuse color.
Color = ...
Specular color.
Color = ...
Emissive color.
number
Shininess value.
number
Material opacity.
PhongMaterial
get ambientColor():
Color
Returns the ambient color.
set ambientColor(
color):void
Sets the ambient color. Component values are copied from the provided color.
Ambient color.
void
get diffuseColor():
Color
Returns the diffuse color.
set diffuseColor(
color):void
Sets the diffuse color. Component values are copied from the provided color.
Diffuse color.
void
get emissionColor():
Color
Returns the emission color.
set emissionColor(
color):void
Sets the emission color. Component values are copied from the provided color.
Emission color.
void
get id():
bigint
Returns the unique identifier of the object.
bigint
get opacity():
number
Returns the material opacity.
number
set opacity(
opacity):void
Sets the material opacity. The value is clamped to the [0, 1] range.
number
Material opacity.
void
get shininess():
number
Returns the material shininess.
number
set shininess(
shininess):void
Sets the material shininess. The value is clamped to the [0, 128] range.
number
Material shininess.
void
get specularColor():
Color
Returns the specular color.
set specularColor(
color):void
Sets the specular color. Component values are copied from the provided color.
Specular color.
void
clone():
PhongMaterial
Creates a new material with the same properties as this material.
PhongMaterial
copy(
other):this
Copies the properties of another Phong material to this material.
PhongMaterial
Source material.
this