Class WebXRLightEstimationSince
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXRLightEstimation
Constructors
constructor
-
new WebXRLightEstimation(
_xrSessionManager: WebXRSessionManager,
options: IWebXRLightEstimationOptions,
): WebXRLightEstimationCreates 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
- _xrSessionManager: WebXRSessionManager
Properties
Optionaldepends On
The dependencies of this feature, if any
directional Light
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.
directional Light Intensity Factor
The scale factor to multiply the intensity of the directional light by. Defaults to 1.0.
disable Auto Attach
Should auto-attach be disabled?
is Disposed
Is this feature disposed?
on Feature Attach Observable
Observers registered here will be executed when the feature is attached
on Feature Detach Observable
Observers registered here will be executed when the feature is detached
on Reflection Cube Map Updated Observable
This observable will notify when the reflection cube map is updated.
Readonlyoptions
options to use when constructing this feature
Static ReadonlyName
The module's name
Static ReadonlyVersion
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
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>
xr Native Feature Name
-
get xrNativeFeatureName(): string
The name of the native xr feature name (like anchor, hit-test, or hand-tracking)
Returns string
-
set xrNativeFeatureName(name: string): void
The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
Parameters
- name: string
Returns void
Methods
attach
-
attach this feature Will usually be called by the features manager
Returns boolean
true if successful.
detach
-
detach this feature. Will usually be called by the features manager
Returns boolean
true if successful.
dispose
-
Dispose this feature and all of the resources attached
Returns void
is Compatible
-
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