Skip to main content

DirectionalLightOptions

@zylem/game-lib


@zylem/game-lib / entity / DirectionalLightOptions

Interface: DirectionalLightOptions

Defined in: packages/game-lib/src/lib/entities/light.ts:69

Extends​

  • BaseLightOptions

Properties​

castShadow?​

optional castShadow?: boolean

Defined in: packages/game-lib/src/lib/entities/light.ts:74

Enable shadow casting. Default false.


color?​

optional color?: ColorRepresentation

Defined in: packages/game-lib/src/lib/entities/light.ts:50

Light colour. Default #ffffff.

Inherited from​

BaseLightOptions.color


intensity?​

optional intensity?: number

Defined in: packages/game-lib/src/lib/entities/light.ts:52

Scalar intensity multiplier. Default 1.

Inherited from​

BaseLightOptions.intensity


name?​

optional name?: string

Defined in: packages/game-lib/src/lib/entities/light.ts:48

Inherited from​

BaseLightOptions.name


position?​

optional position?: Vec3

Defined in: packages/game-lib/src/lib/entities/light.ts:54

World-space position. Default \{0,0,0\}. Not meaningful for ambient.

Inherited from​

BaseLightOptions.position


shadow?​

optional shadow?: LightShadowOptions

Defined in: packages/game-lib/src/lib/entities/light.ts:76

Shadow camera / map tuning.


target?​

optional target?: Vec3

Defined in: packages/game-lib/src/lib/entities/light.ts:72

World-space point the light aims at. Default origin.


type​

type: "directional"

Defined in: packages/game-lib/src/lib/entities/light.ts:70