• Public
  • Public/Protected
  • All

Light Estimation Feature







directionalLight: Nullable<DirectionalLight>

If createDirectionalLightSource is set to true this light source will be created automatically. Otherwise this can be set with an external directional light source. This light will be updated whenever the light estimation values change.

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposed: boolean

Is this feature disposed?

onReflectionCubeMapUpdatedObservable: Observable<BaseTexture>

This observable will notify when the reflection cube map is updated.

options to use when constructing this feature

xrNativeFeatureName: string

The name of the native xr feature name (like anchor, hit-test, or hand-tracking)

Name: "xr-light-estimation" = "xr-light-estimation"

The module's name

Version: 1 = 1

The (Babylon) version of this module. This is an integer representing the implementation version. This number does not correspond to the WebXR specs version


  • get attached(): boolean
  • Is this feature attached

    Returns boolean

  • While the estimated cube map is expected to update over time to better reflect the user's environment as they move around those changes are unlikely to happen with every XRFrame. Since creating and processing the cube map is potentially expensive, especially if mip maps are needed, you can listen to the onReflectionCubeMapUpdatedObservable to determine when it has been updated.

    Returns Nullable<BaseTexture>

  • The most recent light estimate. Available starting on the first frame where the device provides a light probe.

    Returns Nullable<IWebXRLightEstimation>


  • attach(): boolean
  • attach this feature Will usually be called by the features manager

    Returns boolean

    true if successful.

  • detach(): boolean
  • detach this feature. Will usually be called by the features manager

    Returns boolean

    true if successful.

  • dispose(): void
  • Dispose this feature and all of the resources attached

    Returns void

  • isCompatible(): boolean
  • This function will be executed during before enabling the feature and can be used to not-allow enabling it. Note that at this point the session has NOT started, so this is purely checking if the browser supports it

    Returns boolean

    whether or not the feature is compatible in this environment


  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method