Class: DirectionalLight

DirectionalLight()

Directional light source.

Constructor

new DirectionalLight()

Creates a new directional light with the default direction.
Source:

Classes

DirectionalLight

Methods

getDirection() → {Float32Array}

Returns the normalized light direction in world space.
Source:
Returns:
Type
Float32Array

getStrength() → {number}

Returns the directional light strength multiplier.
Source:
Returns:
Type
number

setDirection(direction) → {void}

Sets the light direction by updating the light rotation.
Parameters:
Name Type Description
direction Float32Array | Array.<number> Direction vector (world space).
Source:
Throws:
When the direction is invalid.
Type
TypeError
Returns:
Type
void

setStrength(strength) → {void}

Sets the directional light strength multiplier.
Parameters:
Name Type Description
strength number Directional strength multiplier.
Source:
Throws:
When the strength is invalid.
Type
TypeError
Returns:
Type
void