Documentation - v19.16.0-dev
    Preparing search index...

    How the objects of a Scene are lit, physically based (their colour, metalness and roughness): an environment map (ambient light and reflections), a head light (from the camera: every face seen is lit) and a sun (from a fixed direction), each of a ratio from 0 to 1 (the scene's settings.lighting): its intensity is its ratio over the sum of the three, so that the intensities always sum to 1. This keeps the colours: a face lit by every light shows nearly its own colour (the tone mapping, Khronos PBR Neutral, lowers its darkest channel by 0.04 at most and compresses it above 0.76). Read by the backend at each frame.

    Index

    Constructors

    Properties

    environment: Texture<unknown, TextureEventMap> | null = null

    Equirectangular image of the environment, HDR, loaded by the application (e.g. three.js HDRLoader); null: a neutral room (three.js RoomEnvironment). Prefiltered by the backend when another texture is set or it is updated (needsUpdate); while it loads (never updated), the last map is kept. Ask for a frame after a change.

    Accessors

    • get environmentIntensity(): number

      Intensity of the environment: its ratio over the sum of the three.

      Returns number

    • get headLightIntensity(): number

      Intensity of the head light: its ratio over the sum of the three.

      Returns number

    • get sunIntensity(): number

      Intensity of the sun: its ratio over the sum of the three.

      Returns number

    Methods

    • The head light as drawn: white times its intensity, linear.

      Parameters

      • target: Color

        Receives the colour.

      Returns Color

      target.

    • The direction towards the sun as drawn, from its azimuth and elevation: world (y up), normalized.

      Parameters

      • target: Vector3

        Receives the direction.

      Returns Vector3

      target.

    • The sun as drawn: its colour times its intensity, linear.

      Parameters

      • target: Color

        Receives the colour.

      Returns Color

      target.