Packageaway3d.tools
Classpublic class LightsHelper
InheritanceLightsHelper Inheritance Object

Helper Class for the LightBase objects LightsHelper A series of methods to ease work with LightBase objects



Public Methods
 MethodDefined By
  
addLightsToMaterials(objectContainer3D:ObjectContainer3D, lights:Vector.<LightBase>):void
[static] Applys a series of lights to all materials found into an objectcontainer and its children.
LightsHelper
  
addLightToMaterials(objectContainer3D:ObjectContainer3D, light:LightBase):void
[static] Adds one light to all materials found into an objectcontainer and its children.
LightsHelper
  
[static] Removes a given light from all materials found into an objectcontainer and its children.
LightsHelper
Method Detail
addLightsToMaterials()method
public static function addLightsToMaterials(objectContainer3D:ObjectContainer3D, lights:Vector.<LightBase>):void

Applys a series of lights to all materials found into an objectcontainer and its children. The lights eventually set previously are replaced by the new ones.

Parameters

objectContainer3D:ObjectContainer3D — ObjectContainer3D. The target ObjectContainer3D object to be inspected.
 
lights:Vector.<LightBase> — Vector.<LightBase>. A series of lights to be set to all materials found during parsing of the target ObjectContainer3D.

addLightToMaterials()method 
public static function addLightToMaterials(objectContainer3D:ObjectContainer3D, light:LightBase):void

Adds one light to all materials found into an objectcontainer and its children. The lights eventually set previously on a material are kept unchanged. The new light is added to the lights array of the materials found during parsing.

Parameters

objectContainer3D:ObjectContainer3D — ObjectContainer3D. The target ObjectContainer3D object to be inspected.
 
light:LightBase — LightBase. The light to add to all materials found during the parsing of the target ObjectContainer3D.

removeLightFromMaterials()method 
public static function removeLightFromMaterials(objectContainer3D:ObjectContainer3D, light:LightBase):void

Removes a given light from all materials found into an objectcontainer and its children.

Parameters

objectContainer3D:ObjectContainer3D — ObjectContainer3D. The target ObjectContainer3D object to be inspected.
 
light:LightBase — LightBase. The light to be removed from all materials found during the parsing of the target ObjectContainer3D.