Class: SceneLighting
Experimental
The lights of one live scene (see the module comment).
Constructors
Constructor
new SceneLighting(host): SceneLighting;Experimental
Parameters
| Parameter | Type |
|---|---|
host | SceneLightingHost |
Returns
SceneLighting
Accessors
rig
Get Signature
get rig():
| LightRig
| null;Experimental
The rig, once created (the default rig when the scene sets no lighting).
Returns
| LightRig | null
spec
Get Signature
get spec():
| LightingSpec
| null;Experimental
The scene's lighting as a render spec, or null when unset (Plotly's per-trace lights).
Returns
| LightingSpec | null
Methods
dispose()
dispose(): void;Experimental
Free the rig (a later sync or use creates a new one).
Returns
void
restore()
restore(): void;Experimental
The WebGL context was lost and restored: draw the rig's environment map again.
Returns
void
sync()
sync(
full,
aspect,
renderer,
invalidate?
): void;Experimental
Take the scene's defaulted container (fullLayout.sceneN), the axis box's aspect ratio, the renderer and a redraw request (environment images load asynchronously).
Parameters
| Parameter | Type |
|---|---|
full | Readonly<Record<string, unknown>> |
aspect | readonly [number, number, number] |
renderer | WebGLRenderer | null | undefined |
invalidate? | () => void |
Returns
void
use()
use(mesh): () => void;Experimental
Light mesh with the scene's rig (now and whenever it changes). Returns the function that stops it (call it when the mesh is disposed).
Parameters
| Parameter | Type |
|---|---|
mesh | LightRigUser |
Returns
() => void