class DirectionalLight extends ShadowLight
Creates a DirectionalLight object in the scene, oriented towards the passed direction (Vector3).
The directional light is emitted from everywhere in the given direction.
It can cast shawdows.
Documentation : http://doc.babylonjs.com/tutorials/lights
Name | Type | Description | |
---|---|---|---|
name | string | ||
direction | Vector3 | ||
scene | Scene |
Fix frustum size for the shadow generation. This is disabled if the value is 0.
Specifies a fix frustum size for the shadow generation.
Returns the string "DirectionalLight".
Returns the integer 1.
Sets the passed Effect object with the DirectionalLight transformed position (or position if not parented) and the passed name.
Returns the DirectionalLight.
Name | Type | Description | |
---|---|---|---|
effect | Effect | ||
lightIndex | string |
Gets the minZ used for shadow according to both the scene and the light.
* Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being
-1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.
Name | Type | Description | |
---|---|---|---|
activeCamera | Camera |
Gets the maxZ used for shadow according to both the scene and the light.
* Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being
-1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.
Name | Type | Description | |
---|---|---|---|
activeCamera | Camera |