Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebXRLightEstimation

Light Estimation Feature

since

5.0.0

Hierarchy

Implements

Index

Constructors

constructor

Properties

directionalLightSearch playground for directionalLight

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.

disableAutoAttachSearch playground for disableAutoAttach

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposedSearch playground for isDisposed

isDisposed: boolean

Is this feature disposed?

onReflectionCubeMapUpdatedObservableSearch playground for onReflectionCubeMapUpdatedObservable

onReflectionCubeMapUpdatedObservable: Observable<BaseTexture>

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

Readonly optionsSearch playground for options

options to use when constructing this feature

xrNativeFeatureNameSearch playground for xrNativeFeatureName

xrNativeFeatureName: string

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

Static Readonly NameSearch playground for Name

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

The module's name

Static Readonly VersionSearch playground for Version

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

Accessors

attached

  • get attached(): boolean

reflectionCubeMapTexture

  • 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>

xrLightingEstimate

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

    Returns Nullable<IWebXRLightEstimation>

Methods

attachSearch playground for attach

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

    Returns boolean

    true if successful.

detachSearch playground for detach

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

    Returns boolean

    true if successful.

disposeSearch playground for dispose

  • dispose(): void

isCompatibleSearch playground for isCompatible

  • 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

Legend

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