Class: abstract
FLight
The base class for 2d lights in Fibbo.
Extends
FLight
Accessors
color
get
color():number
set
color(color
):void
Parameters
• color: number
Returns
number
Defined in
intensity
get
intensity():number
set
intensity(intensity
):void
Parameters
• intensity: number
Returns
number
Defined in
lookAt
get
lookAt():object
set
lookAt(lookAt
):void
Parameters
• lookAt
• lookAt.x: number
• lookAt.y: number
Returns
object
x
x:
number
y
y:
number
Defined in
Constructors
new FLight()
new FLight(
scene
,options
?):FLight
Parameters
• scene: FScene
• options?: FLightOptions
Returns
Overrides
FLightCore.constructor
Defined in
Methods
__UPDATE_POSITION__()
__UPDATE_POSITION__():
void
Update the position of the light according to the transform. This method should be called after updating the transform properties.
Returns
void
Defined in
__UPDATE_ROTATION__()
__UPDATE_ROTATION__():
void
Update the rotation of the light according to the transform. This method should be called after updating the transform properties.
Returns
void
Defined in
__UPDATE_SCALE__()
__UPDATE_SCALE__():
void
Update the scale of the light according to the transform. This method should be called after updating the transform properties.
Returns
void
Defined in
emitOnLoaded()
emitOnLoaded():
void
Emit the onLoaded callbacks.
Returns
void
Inherited from
FLightCore.emitOnLoaded
Defined in
core/dist/index.d.ts:54
onLoaded()
onLoaded(
callback
):void
Add a callback to be called when the light is loaded.
Parameters
• callback
The callback function.
Returns
void
Inherited from
FLightCore.onLoaded
Defined in
core/dist/index.d.ts:50
Properties
__CALLBACKS_ON_COLLISION__
__CALLBACKS_ON_COLLISION__:
object
={}
Index Signature
[key
: string
]: () => void
[]
Defined in
__CALLBACKS_ON_LOADED__
__CALLBACKS_ON_LOADED__: () =>
void
[]
Callbacks for when the light is loaded.
Inherited from
FLightCore.__CALLBACKS_ON_LOADED__
Defined in
core/dist/index.d.ts:40
__ID__
__ID__:
number
Defined in
__IS_2D__
__IS_2D__:
boolean
=true
Defined in
__IS_3D__
__IS_3D__:
boolean
=false
Internal flags
Defined in
__LIGHT__
__LIGHT__:
any
The original light object from PIXI.js.
Defined in
__LOOK_AT__
__LOOK_AT__:
object
Look at target of the light.
x
x:
number
y
y:
number
Defined in
scene
scene:
FScene
Scene the light is in.
Overrides
FLightCore.scene
Defined in
transform
transform:
FTransform
Transform of the light.