Skip to content

Function: computeViewLights() ​

ts
function computeViewLights(spec, lightposition, lighting, camera, out?): ViewLights;

Experimental

The lights of spec in view space for the Plotly shader, scaled by the trace's lighting: ambient and hemisphere light by ambient; directional lights keep their color (the shader multiplies diffuse and specular). Without a spec: Plotly's single white light at lightposition and a white ambient light.

Parameters ​

ParameterType
spec| Readonly<LightingSpec> | null
lightpositionreadonly [number, number, number]
lightingReadonly<MeshLighting>
cameraCamera
outViewLights

Returns ​

ViewLights

Released under the MIT License.