Skip to content

Interface: Mesh3dTraceLighting ​

Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights.

Properties ​

PropertyTypeDefault valueDescription
ambient?number0.8Ambient light: the share of the color shown whatever the direction of the light. Range: 0 – 1
diffuse?number0.8Diffuse light: the share of the color lit by the light (Lambert). Range: 0 – 1
facenormalsepsilon?number0.000001Triangles whose normal is shorter than this get no normal in flat shading (degenerate triangles). Range: 0 – 1
fresnel?number0.2Fresnel reflection: how much more light surfaces reflect at grazing angles. Range: 0 – 5
roughness?number0.5Roughness of the surface: the spread of the specular highlights. Range: 0 – 1
specular?number0.05Specular highlights: the light reflected toward the eye. Range: 0 – 2
vertexnormalsepsilon?number1e-12Vertex normals ignore triangle normals shorter than this (tiny triangles do not skew smooth shading). Range: 0 – 1

Released under the MIT License.