View source
class DirectionalLight
package away3d.lights
extends LightBase › Entity › ObjectContainer3D › Object3D › NamedAssetBase
Available on all platforms
DirectionalLight represents an idealized light "at infinity", to be used for distant light sources such as the sun. In any position in the scene, the light raytracing will always be parallel. Although the position of the light does not impact its effect, it can be used along with lookAt to intuitively create day cycles by orbiting the position around a center point and using lookAt at that position.
Constructor
new(xDir:Float = 0, yDir:Float = -1, zDir:Float = 1)
Creates a new DirectionalLight object.
Parameters:
xDir | The x-component of the light's directional vector. |
|---|---|
yDir | The y-component of the light's directional vector. |
zDir | The z-component of the light's directional vector. |