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. The direction of the DirectionalLight is defined by the Entity's Y-axis. You can do a lookAt to easily control this.


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


clone()


setCascadeRatios(r1, r2, r3, r4)

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

Parameters:
Name Type Description
r1
r2
r3
r4