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.


Inherited from LightBase -> Entity -> ObjectContainer3D -> Object3D -> NamedAssetBase -> EventDispatcher.


Can be created using method new:

Lib.Away3D.Lights.DirectionalLight.new(xDir, yDir, zDir)

Creates a new DirectionalLight object.

xDir - (default = 0) - The x-component of the light's directional vector.

yDir - (default = -1) - The y-component of the light's directional vector.

zDir - (default = 1) - The z-component of the light's directional vector.


Created DirectionalLight object has properties:

direction

The direction of the light. (Vector3D)

sceneDirection

[read-only] The direction of the light in scene coordinates. (Vector3D)

Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator