Packageorg.ffilmation.engine.core
Classpublic class fLight
InheritancefLight Inheritance fElement Inheritance flash.events.EventDispatcher
SubclassesfGlobalLight, fOmniLight

The fLight is an abstract definition of a light that contains generic information such as intensity, size, decay and color. To create a new type of light you must extend this class

YOU CAN'T CREATE INSTANCES OF THIS OBJECT



Public Properties
 PropertyDefined by
  bump : Boolean
Determines if this light will be rendered with bumpmapping.
fLight
  decay : Number
From 0 to 100 marks the distance along the lights's radius from where intensity stars to fade.
fLight
  hexcolor : Number
An string specifying the color of the light in HTML format, example: #ffeedd
fLight
 Inheritedid : String
The string identifier of this element.
fElement
  intensity : Number
Intensity of the light goes from 0 to 100
fLight
  size : Number
Radius of the sphere that identifies the light
fLight
 Inheritedx : Number
X coordinate fot this element
fElement
 Inheritedy : Number
Y coordinate for this element
fElement
 Inheritedz : Number
Z coordinate for this element
fElement
Public Methods
 MethodDefined by
 Inherited
distanceTo(x:Number, y:Number, z:Number):Number
Returns the distance of this element to the given coordinate
fElement
 Inherited
follow(target:fElement, elasticity:Number = 0):void
Makes element follow target element
fElement
 Inherited
moveTo(x:Number, y:Number, z:Number):void
Moves the element to a given position
fElement
  
render():void
Renders the light
fLight
  
setIntensity(percent:Number):void
This method changes the light's intensity
fLight
 Inherited
stopFollowing(target:fElement):void
Stops element from following another element
fElement
Public Constants
 ConstantDefined by
  INTENSITYCHANGE : String = "lightintensitychange"
[static] The fLight.INTENSITYCHANGE constant defines the value of the type property of the event object for a lightintensitychange event.
fLight
 InheritedMOVE : String = "elementmove"
[static] The fElement.MOVE constant defines the value of the type property of the event object for a elementmove event.
fElement
 InheritedNEWCELL : String = "elementnewcell"
[static] The fElement.NEWCELL constant defines the value of the type property of the event object for a elementnewcell event.
fElement
  RENDER : String = "lightrender"
[static] The fLight.RENDER constant defines the value of the type property of the event object for a lightrender event.
fLight
Property detail
bumpproperty
public var bump:Boolean

Determines if this light will be rendered with bumpmapping. Please note that for the bumpMapping to work in a given surface, the surface will need a bumpMap definition and bumpMapping must be enabled in the engine's global parameters

decayproperty 
public var decay:Number

From 0 to 100 marks the distance along the lights's radius from where intensity stars to fade. A 0 decay defines a solid light

hexcolorproperty 
public var hexcolor:Number

An string specifying the color of the light in HTML format, example: #ffeedd

intensityproperty 
public var intensity:Number

Intensity of the light goes from 0 to 100

sizeproperty 
public var size:Number

Radius of the sphere that identifies the light

Method detail
render()method
public function render():void

Renders the light

setIntensity()method 
public function setIntensity(percent:Number):void

This method changes the light's intensity

Parameters
percent:Number — New intensity from 0 to 100
Constant detail
INTENSITYCHANGEconstant
public static const INTENSITYCHANGE:String = "lightintensitychange"

The fLight.INTENSITYCHANGE constant defines the value of the type property of the event object for a lightintensitychange event. The event is dispatched when the light changes its intensity

RENDERconstant 
public static const RENDER:String = "lightrender"

The fLight.RENDER constant defines the value of the type property of the event object for a lightrender event. The event is dispatched when the light is rendered