API

Class RectAreaLight

A rectangular area light defined by an unique point in world space, a width and a height. The light is emitted from the rectangular area in the -Z direction.

Hierarchy (View Summary)

Index
  • get emissionTexture(): Nullable<BaseTexture>

    Gets Rect Area Light emission texture. (Note: This texture needs pre-processing! Use AreaLightTextureTools to pre-process the texture).

    Returns Nullable<BaseTexture>

  • set emissionTexture(value: Nullable<BaseTexture>): void

    Sets Rect Area Light emission texture. (Note: This texture needs pre-processing! Use AreaLightTextureTools to pre-process the texture).

    Parameters

    • value: Nullable<BaseTexture>

    Returns void

  • Prepares the list of defines specific to the light type.

    Parameters

    • defines: any

      the list of defines

    • lightIndex: number

      defines the index of the light for the effect

    Returns void

  • Serializes the rect area light into a serialization object. The emission texture is normally produced at runtime by AreaLightTextureTools and has no source URL, so its pixels are embedded as a base64 string to keep the scene self-contained.

    Returns any

    the serialized object

  • Sets the passed Effect "effect" with the PointLight transformed position (or position, if none) and passed name (string).

    Parameters

    • effect: Effect

      The effect to update

    • lightIndex: string

      The index of the light in the effect to update

    Returns RectAreaLight

    The point light