DirectionalLight Class
The DirectionalLight class is used to render a light with a limited range of 1-179 degrees. When calculating shadows from this type of light they are calculated from a single point
Constructor
DirectionalLight
(
-
[parameters]
Parameters:
-
[parameters]Object optionalParameters is an object that contains the DirectionalLights properties
-
[x=0]Number optionalX position
-
[y=0]Number optionalY position
-
[rotation=0]Number optionalRotation of the light
-
[range=0]Number optionalThe range of the light in degrees (angle)
-
[colour=new LE.Colour(255, 255, 255, 255)]Colour optionalColour, default is white
-
[intensity=0.1]Number optionalLight intensity/brightness
-
[shader=LE.LightShaders.POINT_LIGHT]Number optionalIndex of the shader used during rendering
-
Properties
intensity
Number
Default: 0.1
range
Number
Default: 90
rotation
Number
Default: 0
shader
Number
Default: LE.LightShaders.POINT_LIGHT
type
String
Automatically generated on creation
x
Number
Default: 0
y
Number
Default: 0
