mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
963 B
963 B
PhongMaterial
A material class specifies reflection properties of a shiny surface, uses Blinn-Phong model for underlying implementation.
Usage
Create a material class
const phongMaterial = new PhongMaterial({
ambient: 0.2,
diffuse: 0.5,
shininess: 32,
specularColor: [255, 255, 255]
});
Methods
constructor
The constructor for the PhongMaterial class. Use this to create a new PhongMaterial.
const phongMaterial = new PhongMaterial({ambient, diffuse, shininess, specularColor});
ambient- (number,) Ambient light reflection ratio, default value is0.4.diffuse- (number) Diffuse light reflection ratio, default value is0.6.shininess- (number) Parameter to control specular highlight radius, default value is32.specularColor- (array) Color applied to specular lighting, default value is[255, 255, 255].