Skip to content

@fibbojs / 3d / FDirectionalLight

Class: FDirectionalLight

A directional light in 3d space.

Extends

Accessors

color

get color(): Color

set color(color): void

Parameters

color: ColorRepresentation

Returns

Color

Inherited from

FLight.color

Defined in

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


intensity

get intensity(): number

set intensity(intensity): void

Parameters

intensity: number

Returns

number

Inherited from

FLight.intensity

Defined in

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


lookAt

get lookAt(): undefined | FVector3

set lookAt(lookAt): void

Parameters

lookAt: FVector3

Returns

undefined | FVector3

Inherited from

FLight.lookAt

Defined in

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


shadowQuality

get shadowQuality(): number

set shadowQuality(quality): void

Parameters

quality: number

Returns

number

Inherited from

FLight.shadowQuality

Defined in

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

Constructors

new FDirectionalLight()

new FDirectionalLight(scene, options?): FDirectionalLight

Parameters

scene: FScene

options?: FLightOptions

Returns

FDirectionalLight

Overrides

FLight.constructor

Defined in

3d/src/lights/FDirectionalLight.ts:11

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

Inherited from

FLight.__UPDATE_LOOK_AT__

Defined in

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


__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

Inherited from

FLight.__UPDATE_POSITION__

Defined in

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


__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

Inherited from

FLight.__UPDATE_ROTATION__

Defined in

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


__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

Inherited from

FLight.__UPDATE_SCALE__

Defined in

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


emitOnLoaded()

emitOnLoaded(): void

Emit the onLoaded callbacks.

Returns

void

Inherited from

FLight.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

FLight.onLoaded

Defined in

core/dist/index.d.ts:50

Properties

__CALLBACKS_ON_COLLISION__

__CALLBACKS_ON_COLLISION__: object = {}

Index Signature

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

Inherited from

FLight.__CALLBACKS_ON_COLLISION__

Defined in

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


__CALLBACKS_ON_LOADED__

__CALLBACKS_ON_LOADED__: () => void[]

Callbacks for when the light is loaded.

Inherited from

FLight.__CALLBACKS_ON_LOADED__

Defined in

core/dist/index.d.ts:40


__ID__

__ID__: number

Inherited from

FLight.__ID__

Defined in

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


__IS_2D__

__IS_2D__: boolean = false

Inherited from

FLight.__IS_2D__

Defined in

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


__IS_3D__

__IS_3D__: boolean = true

Internal flags

Inherited from

FLight.__IS_3D__

Defined in

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


__LIGHT__

__LIGHT__: Light<undefined | LightShadow<Camera>>

The original light object from Three.js.

Inherited from

FLight.__LIGHT__

Defined in

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


__LOOK_AT__

__LOOK_AT__: undefined | FVector3

Look at target of the light.

Inherited from

FLight.__LOOK_AT__

Defined in

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


__SHADOW_QUALITY__

__SHADOW_QUALITY__: number

Quality of the shadow. Default is 5.

Inherited from

FLight.__SHADOW_QUALITY__

Defined in

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


scene

scene: FScene

Scene the light is in.

Inherited from

FLight.scene

Defined in

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


transform

transform: FTransform

Transform of the light.

Inherited from

FLight.transform

Defined in

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