Class WebXRLightEstimation
Hierarchy
- WebXRAbstractFeature
- WebXRLightEstimation
Index
Constructors
constructor
Creates a new instance of the light estimation feature
Parameters
_xrSessionManager: WebXRSessionManager
an instance of WebXRSessionManager
options: IWebXRLightEstimationOptions
options to use when constructing this feature
Returns WebXRLightEstimation
Properties
directional LightSearch playground for 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.
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
is DisposedSearch playground for isDisposed
Is this feature disposed?
on Reflection Cube Map Updated ObservableSearch playground for onReflectionCubeMapUpdatedObservable
This observable will notify when the reflection cube map is updated.
Readonly optionsSearch playground for options
options to use when constructing this feature
xr Native Feature NameSearch playground for xrNativeFeatureName
The name of the native xr feature name (like anchor, hit-test, or hand-tracking)
Static Readonly NameSearch playground for Name
The module's name
Static Readonly VersionSearch playground for Version
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
Is this feature attached
Returns boolean
reflection Cube Map Texture
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>
xr Lighting Estimate
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 this feature Will usually be called by the features manager
Returns boolean
true if successful.
detachSearch playground for detach
detach this feature. Will usually be called by the features manager
Returns boolean
true if successful.
disposeSearch playground for dispose
Dispose this feature and all of the resources attached
Returns void
is CompatibleSearch playground for isCompatible
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
Light Estimation Feature
5.0.0