This node represents the scene’s lighting and manages the lighting model’s life cycle for the current build 3D object. It is responsible for computing the total outgoing light in a given lighting context.
Constructor
new LightsNode()Constructs a new lights node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
| get hasLights | boolean | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| totalDiffuseNode | any | — | |
| totalSpecularNode | any | — | |
| outgoingLightNode | any | — | |
| _lights | Array<Light> | — | |
| _lightNodes | null | Array<LightingNode> | — | |
| _lightNodesHash | null | string | — | |
| Method | Type | |
|---|---|---|
| customCacheKey | () => number | |
| getHash | (builder: NodeBuilder) => string | |
| analyze | (builder: any) => void | |
| setupLightsNode | (builder: NodeBuilder) => void | |
| setupDirectLight | (builder: Object, lightNode: Object, lightData: Object) => void | |
| setupDirectRectAreaLight | (builder: any, lightNode: any, lightData: any) => void | |
| setupLights | (builder: NodeBuilder, lightNodes: Array<…>) => void | |
| getLightNodes | (builder: any) => null | Array<…> | |
| setup | (builder: NodeBuilder) => any | |
| setLights | (lights: Array<…>) => LightsNode | |
| getLights | () => Array<…> | |
Extends
NodeTSL function for creating an instance of LightsNode and configuring
it with the given array of lights.
| Parameter | Type | Default Value |
|---|---|---|
| lights? | Array<Light> | [] |
Returns
LightsNode