Skip to main content

Type Alias: BaseLightConfig

BaseLightConfig: object

Type declaration

castShadows?

optional castShadows: boolean

Whether this Light casts shadows (disabled by default)

colorKelvin?

optional colorKelvin: number

Sets the initial color of a light.

Param

Color of the light specified in the linear sRGB color-space. The default is white 1.

direction?

optional direction: Float3

Sets the initial direction of a light in world space.

Param

Light's direction in world space. Should be a unit vector. The default is 0.

Note

The Light's direction is ignored for Type.POINT lights.

intensity?

optional intensity: number

Sets the initial intensity of a light.

Param

This parameter depends on the Light.Type:

  • For directional lights, it specifies the illuminance in lux (or lumen/m^2).
  • For point lights and spot lights, it specifies the luminous power in lumen.

For example, the sun's illuminance is about 100,000 lux.

This method overrides any prior calls to intensity or intensityCandela.

position?

optional position: Float3

Sets the initial position of the light in world space. The default is at the origin.

Note

The Light's position is ignored for directional lights (Type.DIRECTIONAL or Type.SUN)

Defined in

src/types/LightConfig.ts:3