Class Light

Class Hierarchy

Light node is a source of light for a 3D scene.

Light nodes contain properties that are passed as uniforms to shaders when 3D nodes are rendered. Note that lights affect only the rendering of nodes which use materials with shaders that use those lights.

Inherits properties and message types from LightMetadata.

Synopsis

Methods
create()

Creates a light node

createDirectional()

Creates a directional light

createPoint()

Creates a point light

createSpot()

Creates a spot light

Light.Light:create(name)

Creates a light node.

Parameters
name (string)

The name of the node.

Return Values
(Light)

The created node.

Light.Light:createDirectional(name)

Creates a directional light.

Parameters
name (string)

The name of the node.

Return Values
(Light)

The created node.

Light.Light:createPoint(name)

Creates a point light.

Parameters
name (string)

The name of the node.

Return Values
(Light)

The created node.

Light.Light:createSpot(name)

Creates a spot light.

Parameters
name (string)

The name of the node.

Return Values
(Light)

The created node.