Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PhongShadingStyleOptions

Interface for configuration properties of PhongShadingStyle.

 // Example syntax, use Phong shading with specific configuration.
 pointSeries3D.setColorShadingStyle(new ColorShadingStyles.Phong({
     // Add specular reflection for "highlight" effect.
     specularReflection: 0.5,
     specularColor: ColorRGBA(255, 255, 255),
 }))

Implemented by

Index

Properties

ambientColor

ambientColor : Color

Ambient light color.

Describes light that is present at all points of the surface, kind of like a background light.

The impact of ambient color on a surface is also affected by ambientReflection property.

The default setting is black.

 // Example, white ambient light.
 ambientColor: ColorRGBA(255, 255, 255)

ambientReflection

ambientReflection : number

Controls how much ambient light affects the color.

Value ranges from 0 to 1, where higher values correspond to reflecting more.

The impact of ambient color on a surface is also affected by ambientColor property.

The default value is 1.0.

diffuseReflection

diffuseReflection : number

Controls how strongly the diffuse color is. Diffuse color is the color defined by user.

Value ranges from 0 to 1, where higher values correspond to reflecting more.

The default value is 1.0.

shininess

shininess : number

Specular highlight shininess.

Describes how shiny the material surface is.

The impact of specular color on a surface is also affected by specularReflection and specularColor properties.

Value ranges from 1 to 64, where higher values correspond to being exponentially less shiny.

The default value is 32.

specularColor

specularColor : Color

Specular highlight color.

Describes light that is reflected from a shiny surface. Can be used to get a "shine" effect on surfaces.

The impact of specular color on a surface is also affected by specularReflection and shininess properties.

The default setting is white.

 // Example, red specular light.
 specularColor: ColorRGBA(255, 0, 0)

specularReflection

specularReflection : number

Controls specular reflection strength.

Describes how much the material reflects specular light.

The impact of specular color on a surface is also affected by shininess and specularColor properties.

Value ranges from 0 to 1, where higher values correspond to reflecting more.

The default value is 0.1.