Skip to content

@fibbojs / 3d / FLight

Class: abstract FLight ​

The base class for 3d lights in Fibbo.

Extends ​

  • FLight

Extended by ​

Accessors ​

color ​

get color(): Color

set color(color): void

Parameters ​

• color: ColorRepresentation

Returns ​

Color

Defined in ​

3d/src/lights/FLight.ts:124


intensity ​

get intensity(): number

set intensity(intensity): void

Parameters ​

• intensity: number

Returns ​

number

Defined in ​

3d/src/lights/FLight.ts:132


lookAt ​

get lookAt(): FVector3

set lookAt(lookAt): void

Parameters ​

• lookAt: FVector3

Returns ​

FVector3

Defined in ​

3d/src/lights/FLight.ts:140


shadowQuality ​

get shadowQuality(): number

set shadowQuality(quality): void

Parameters ​

• quality: number

Returns ​

number

Defined in ​

3d/src/lights/FLight.ts:151

Constructors ​

new FLight() ​

new FLight(options?): FLight

Parameters ​

• options?: FLightOptions

Returns ​

FLight

Overrides ​

FLightCore.constructor

Defined in ​

3d/src/lights/FLight.ts:57

Methods ​

__UPDATE_LOOK_AT__() ​

__UPDATE_LOOK_AT__(): void

Update the look at target of the light. This method should be called after updating the position, so the light can look at the target.

Returns ​

void

Defined in ​

3d/src/lights/FLight.ts:116


__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 ​

3d/src/lights/FLight.ts:91


__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 ​

3d/src/lights/FLight.ts:100


__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 ​

3d/src/lights/FLight.ts:108


emitOnLoaded() ​

emitOnLoaded(): void

Emit the onLoaded callbacks.

Returns ​

void

Inherited from ​

FLightCore.emitOnLoaded

Defined in ​

core/dist/index.d.ts:61


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:57

Properties ​

__CALLBACKS_ON_COLLISION__ ​

__CALLBACKS_ON_COLLISION__: object = {}

Index Signature ​

[key: string]: () => void[]

Defined in ​

3d/src/lights/FLight.ts:30


__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:47


__ID__ ​

__ID__: number

Defined in ​

3d/src/lights/FLight.ts:29


__IS_2D__ ​

__IS_2D__: boolean = false

Defined in ​

3d/src/lights/FLight.ts:28


__IS_3D__ ​

__IS_3D__: boolean = true

Internal flags

Defined in ​

3d/src/lights/FLight.ts:27


__LIGHT__ ​

__LIGHT__: Light<LightShadow<Camera>>

The original light object from Three.js.

Defined in ​

3d/src/lights/FLight.ts:35


__LOOK_AT__ ​

__LOOK_AT__: FVector3

Look at target of the light.

Defined in ​

3d/src/lights/FLight.ts:50


__SHADOW_QUALITY__ ​

__SHADOW_QUALITY__: number

Quality of the shadow. Default is 5.

Defined in ​

3d/src/lights/FLight.ts:55


scene ​

scene: FScene

Scene the light is in.

Overrides ​

FLightCore.scene

Defined in ​

3d/src/lights/FLight.ts:40


transform ​

transform: FTransform

Transform of the light.

Defined in ​

3d/src/lights/FLight.ts:45