| Package | org.ffilmation.engine.core |
| Class | public class fLight |
| Inheritance | fLight fElement flash.events.EventDispatcher |
| Subclasses | fGlobalLight, 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
| Property | Defined by | ||
|---|---|---|---|
| bump : Boolean Determines if this light will be rendered with bumpmapping.
| fLight | ||
![]() | controller : fEngineElementController
Assigns a controller to this element
| fElement | |
![]() | customData : Object
As elements are not defined as "dynamic", this property can be used to store extra info about this element at run-time.
| fElement | |
| 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 | ||
![]() | id : 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 | ||
![]() | x : Number
X coordinate fot this element
| fElement | |
![]() | xmlObj : XML
This is the XML node from the scene XML that generated this element.
| fElement | |
![]() | y : Number
Y coordinate for this element
| fElement | |
![]() | z : Number
Z coordinate for this element
| fElement | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
distanceTo(x:Number, y:Number, z:Number):Number
Returns the distance of this element to the given coordinate
| fElement | |
![]() |
Makes element follow target element
| fElement | |
![]() |
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 | ||
![]() |
stopFollowing(target:fElement):void
Stops element from following another element
| fElement | |
| Constant | Defined 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 | ||
![]() | MOVE : String = "elementmove" [static]
The fElement.MOVE constant defines the value of the
type property of the event object for a elementmove event. | fElement | |
![]() | NEWCELL : 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 | ||
| bump | property |
public var bump:BooleanDetermines 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
| decay | property |
public var decay:NumberFrom 0 to 100 marks the distance along the lights's radius from where intensity stars to fade. A 0 decay defines a solid light
| hexcolor | property |
public var hexcolor:NumberAn string specifying the color of the light in HTML format, example: #ffeedd
| intensity | property |
public var intensity:NumberIntensity of the light goes from 0 to 100
| size | property |
public var size:NumberRadius of the sphere that identifies the light
| render | () | method |
public function render():voidRenders the light
| setIntensity | () | method |
public function setIntensity(percent:Number):voidThis method changes the light's intensity
Parameterspercent:Number — New intensity from 0 to 100
|
| INTENSITYCHANGE | constant |
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
| RENDER | constant |
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