File: LightsNode.md | Updated: 11/15/2025
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.
Constructs a new lights node.
LightsNode sets this property to true by default.
Default is true.
Overrides: Node#global
Whether the scene has lights or not.
A node representing the outgoing light.
A node representing the total diffuse light.
A node representing the total specular light.
Overwrites the default Node#customCacheKey implementation by including light data into the cache key.
Overrides: Node#customCacheKey
Returns: The custom cache key.
Computes a hash value for identifying the current light nodes setup.
builder | A reference to the current node builder.
---|---
Overrides: Node#getHash
Returns: The computed hash.
Returns an array of the scene's lights.
Returns: The scene's lights.
Configures this node with an array of lights.
lights | An array of lights.
---|---
Returns: A reference to this node.
The implementation makes sure that for each light in the scene there is a corresponding light node. By building the light nodes and evaluating the lighting model the outgoing light is computed.
builder | A reference to the current node builder.
---|---
Overrides: Node#setup
Returns: A node representing the outgoing light.
Sets up a direct light in the lighting model.
builder | The builder object containing the context and stack.
---|---
lightNode | The light node.
lightData | The light object containing color and direction properties.
Setups the internal lights by building all respective light nodes.
builder | A reference to the current node builder.
---|---
lightNodes | An array of lighting nodes.
Creates lighting nodes for each scene light. This makes it possible to further process lights in the node system.
builder | A reference to the current node builder.
---|---