Taos API Reference
    Preparing search index...

    Class XrLightEstimation

    WebXR lighting estimation helper: reads the AR runtime's estimate of the real environment's lighting so virtual objects are lit to match the room — a dominant directional term (sun/lamp) plus an order-2 spherical-harmonics ambient. Pipe the directional term into a DirectionalLight via applyToDirectional, and the SH into an ambient/IBL probe.

    Requires a session created with the 'light-estimation' feature. Call start once (async), then update every XRFrame.

    Part of the AR half of the WebXR integration — see TODO/webxr-integration.md.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    estimate: XrLightSample | null = null

    Latest estimate, or null until start resolves and update has produced one.

    Accessors

    Methods

    • Drive a DirectionalLight from the latest estimate (no-op if there is none this frame). Sets direction, color, and intensity; leaves shadow settings untouched.

      Parameters

      • light: DirectionalLight

      Returns void