Class WebXRDepthSensing
Hierarchy
- WebXRAbstractFeature
- WebXRDepthSensing
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Creates a new instance of the depth sensing feature
Parameters
_xrSessionManager: WebXRSessionManager
the WebXRSessionManager
options: IWebXRDepthSensingOptions
options for WebXR Depth Sensing Feature
Returns WebXRDepthSensing
Properties
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
is DisposedSearch playground for isDisposed
Is this feature disposed?
on Feature Attach ObservableSearch playground for onFeatureAttachObservable
Observers registered here will be executed when the feature is attached
on Feature Detach ObservableSearch playground for onFeatureDetachObservable
Observers registered here will be executed when the feature is detached
on Get Depth In Meters AvailableSearch playground for onGetDepthInMetersAvailable
Event that notify when DepthInformation.getDepthInMeters
is available.
getDepthInMeters
method needs active XRFrame (not available for cached XRFrame)
Readonly optionsSearch playground for options
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
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>
latest Depth Buffer
cached depth buffer
Returns Nullable<ArrayBufferView>
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
An XRRigidTransform that needs to be applied when indexing into the depth buffer.
Returns Nullable<XRRigidTransform>
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>
Methods
attachSearch playground for attach
attach this feature Will usually be called by the features manager
Parameters
Optional force: boolean
Returns boolean
true if successful.
detachSearch playground for detach
detach this feature.
Returns boolean
true if successful, false if failed or already detached
disposeSearch playground for dispose
Dispose this feature and all of the resources attached
Returns void
getXRSession Init ExtensionSearch playground for getXRSessionInitExtension
Extends the session init object if needed
Returns Promise<Partial<XRSessionInit>>
augmentation object for the xr session init object.
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
WebXR Feature for WebXR Depth Sensing Module
5.49.1