Skip to content

Function: sceneMeshLighting() ​

ts
function sceneMeshLighting(
  trace,
  onTextureLoad?,
): Pick<MeshData, 'lighting' | 'lightposition' | 'material' | 'castShadow' | 'receiveShadow'>;

Experimental

The mesh primitive's lighting fields of a defaulted trace: Plotly's lighting / lightposition, material (null for Plotly's model) and the shadow flags. onTextureLoad is called when a material.matcap image has loaded (request a frame).

Parameters ​

ParameterType
traceReadonly< | FullTrace | Record<string, unknown>>
onTextureLoad?() => void

Returns ​

Pick<MeshData, | "lighting" | "lightposition" | "material" | "castShadow" | "receiveShadow">

Released under the MIT License.