Packageaway3d.lights
Classpublic class DirectionalLight3D
InheritanceDirectionalLight3D Inheritance AbstractLight Inheritance Object

Lightsource that colors all shaded materials proportional to the dot product of the offset vector with the normal vector. The scalar value of distance does not affect the resulting light intensity, it is calulated as if the source is an infinite distance away with an infinite brightness.



Public Properties
 PropertyDefined By
  ambient : Number
Defines a coefficient for the ambient light intensity.
DirectionalLight3D
 InheritedambientBitmap : BitmapData
[read-only] Lightmap for ambient intensity.
AbstractLight
 InheritedambientColorTransform : ColorTransform
[read-only] Color transform used in cached shading materials for combined ambient and diffuse color intensities.
AbstractLight
 InheritedambientDiffuseBitmap : BitmapData
[read-only] Combined lightmap for ambient and diffuse intensities.
AbstractLight
  brightness : Number
Defines a coefficient for the overall light intensity.
DirectionalLight3D
 Inheritedcolor : uint
Defines the color of the light object.
AbstractLight
 Inheriteddebug : Boolean
Toggles debug mode: light object is visualised in the scene.
AbstractLight
  diffuse : Number
Defines a coefficient for the diffuse light intensity.
DirectionalLight3D
 InheriteddiffuseBitmap : BitmapData
[read-only] Lightmap for diffuse intensity.
AbstractLight
 InheriteddiffuseColorTransform : ColorTransform
[read-only] Color transform used in cached shading materials for ambient intensities.
AbstractLight
  direction : Vector3D
Defines the direction of the light relative to the local coordinates of the parent ObjectContainer3D.
DirectionalLight3D
 Inheritedparent : ObjectContainer3D
Defines the parent of the light.
AbstractLight
  sceneDirection : Vector3D
[read-only]
DirectionalLight3D
  specular : Number
Defines a coefficient for the specular light intensity.
DirectionalLight3D
 InheritedspecularBitmap : BitmapData
[read-only] Lightmap for specular intensity.
AbstractLight
Protected Properties
 PropertyDefined By
 Inheritedini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
AbstractLight
Public Methods
 MethodDefined By
  
DirectionalLight3D(init:Object = null)
Creates a new DirectionalLight3D object.
DirectionalLight3D
  
[override] Duplicates the light object's properties to another DirectionalLight3D object
DirectionalLight3D
Protected Methods
 MethodDefined By
  
[override]
DirectionalLight3D
  
[override] Updates the bitmapData object used as the lightmap for the combined ambient and diffue light shading.
DirectionalLight3D
Property Detail
ambientproperty
ambient:Number

Defines a coefficient for the ambient light intensity.


Implementation
    public function get ambient():Number
    public function set ambient(value:Number):void
brightnessproperty 
brightness:Number

Defines a coefficient for the overall light intensity.


Implementation
    public function get brightness():Number
    public function set brightness(value:Number):void
diffuseproperty 
diffuse:Number

Defines a coefficient for the diffuse light intensity.


Implementation
    public function get diffuse():Number
    public function set diffuse(value:Number):void
directionproperty 
direction:Vector3D

Defines the direction of the light relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get direction():Vector3D
    public function set direction(value:Vector3D):void
sceneDirectionproperty 
sceneDirection:Vector3D  [read-only]


Implementation
    public function get sceneDirection():Vector3D
specularproperty 
specular:Number

Defines a coefficient for the specular light intensity.


Implementation
    public function get specular():Number
    public function set specular(value:Number):void
Constructor Detail
DirectionalLight3D()Constructor
public function DirectionalLight3D(init:Object = null)

Creates a new DirectionalLight3D object.

Parameters
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
####INIT####
Method Detail
clone()method
override public function clone(light:AbstractLight = null):AbstractLight

Duplicates the light object's properties to another DirectionalLight3D object

Parameters

light:AbstractLight (default = null) — [optional] The new light instance into which all properties are copied

Returns
AbstractLight — The new light instance with duplicated properties applied
onSceneTransformChange()method 
override protected function onSceneTransformChange(event:Object3DEvent = null):void

Parameters

event:Object3DEvent (default = null)

updateAmbientDiffuse()method 
override protected function updateAmbientDiffuse():void

Updates the bitmapData object used as the lightmap for the combined ambient and diffue light shading.