Class WebXRDepthSensingSince
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXRDepthSensing
Constructors
constructor
-
new WebXRDepthSensing(
_xrSessionManager: WebXRSessionManager,
options: IWebXRDepthSensingOptions,
): WebXRDepthSensingCreates a new instance of the depth sensing feature
Parameters
- _xrSessionManager: WebXRSessionManager
the WebXRSessionManager
- options: IWebXRDepthSensingOptions
options for WebXR Depth Sensing Feature
Returns WebXRDepthSensing
- _xrSessionManager: WebXRSessionManager
Properties
Optionaldepends On
The dependencies of this feature, if any
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 Get Depth In Meters Available
Event that notify when DepthInformation.getDepthInMeters is available.
getDepthInMeters method needs active XRFrame (not available for cached XRFrame)
Readonlyoptions
options for WebXR Depth Sensing 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
depth Data Format
-
Describes which depth sensing data format ("ushort" or "float") is used.
Returns WebXRDepthDataFormat
depth Usage
-
Describes which depth-sensing usage ("cpu" or "gpu") is used.
Returns WebXRDepthUsage
height
-
Height of depth data. If depth data is not exist, returns null.
Returns Nullable<number>
is Depth Sensing Active
-
get isDepthSensingActive(): boolean
Whether depth sensing is currently active for the XR session. Returns false when there is no active session or the runtime does not expose the active state.
Returns boolean
latest Depth Buffer
-
cached depth buffer
Returns Nullable<ArrayBufferView<ArrayBufferLike>>
latest Depth Image Texture
-
Latest cached Texture of depth image which is made from the depth buffer data.
Returns Nullable<RawTexture>
latest Internal Texture
-
Latest cached InternalTexture which containing depth buffer information. This can be used when the depth usage is "gpu".
Returns Nullable<InternalTexture>
norm Depth Buffer From Norm View
-
get normDepthBufferFromNormView(): any
An XRRigidTransform that needs to be applied when indexing into the depth buffer.
Returns any
raw Value To Meters
-
Scale factor by which the raw depth values must be multiplied in order to get the depths in meters.
Returns Nullable<number>
width
-
Width of depth data. If depth data is not exist, returns null.
Returns Nullable<number>
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
Parameters
Optionalforce: booleanshould attachment be forced (even when already attached)
Returns boolean
true if successful.
detach
-
detach this feature.
Returns boolean
true if successful, false if failed or already detached
dispose
-
Dispose this feature and all of the resources attached
Returns void
get XR Session Init Extension
-
Extends the session init object if needed
Returns Promise<XRSessionInit>
augmentation object for the xr session init object.
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
pause Depth Sensing Async
-
Pauses depth sensing for the active XR session.
Returns Promise<void>
A promise that resolves when the native pause operation completes.
resume Depth Sensing Async
-
Resumes depth sensing for the active XR session.
Returns Promise<void>
A promise that resolves when the native resume operation completes.
WebXR Feature for WebXR Depth Sensing Module 5.49.1