Class: DirectionalLight

DirectionalLight

DirectionalLight represents a light source that is "infinitely far away", used as an approximation for sun light where locally all sun rays appear to be parallel.


new DirectionalLight()

Properties:
Name Type Description
shadowMapSize number

The shadow map size used by this light.

direction Float4

The direction in world space of the light rays. This cannot be set per component but needs to be assigned as a whole Float4.

Author:
  • derschmale <http://www.derschmale.com>

Methods


setCascadeRatios(r1, r2, r3, r4)

The ratios that define every cascade's split distance. 1 is at the far plane, 0 is at the near plane.

Parameters:
Name Type Description
r1
r2
r3
r4