Skip to main content

Type Alias: SpotLightExtraConfig

SpotLightExtraConfig: object

Type declaration

falloffRadius?

optional falloffRadius: number

Set the falloff distance for point lights and spot lights. Falloff distance in world units.

At the falloff distance, the light has no more effect on objects.

The falloff distance essentially defines a sphere of influence around the light, and therefore has an impact on performance. Larger falloffs might reduce performance significantly, especially when many lights are used.

Try to avoid having a large number of light's spheres of influence overlap.

Default

1 meter

Note

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

spotLightCone?

optional spotLightCone: [number, number]

Defines a spot light'st angular falloff attenuation.

A spot light is defined by a position, a direction and two cones, \p inner and \p outer. These two cones are used to define the angular falloff attenuation of the spot light and are defined by the angle from the center axis to where the falloff begins (i.e. cones are defined by their half-angle).

Both inner and outer are silently clamped to a minimum value of 0.5 degrees (~0.00873 radians) to avoid floating-point precision issues during rendering.

Param

inner cone angle in radians between 0.00873 and \p outer

Param

outer cone angle in radians between 0.00873 inner and @f$ \pi/2 @f$

Note

The spot light cone is ignored for directional and point lights.

See

Type.SPOT, Type.FOCUSED_SPOT

type

type: "spot" | "point" | "focused_point"

  • POINT, //!< Point light, emits light from a position, in all directions.
    • FOCUSED_SPOT, //!< Physically correct spot light.
    • SPOT, //!< Spot light with coupling of outer cone and illumination disabled.

Defined in

src/types/LightConfig.ts:49