Class WebXRAbstractFeatureAbstract
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXRHitTestLegacy
- WebXRAnchorSystem
- WebXRPlaneDetector
- WebXRBackgroundRemover
- WebXRMotionControllerTeleportation
- WebXRControllerPointerSelection
- WebXRControllerPhysics
- WebXRHitTest
- WebXRFeaturePointSystem
- WebXRHandTracking
- WebXRMeshDetector
- WebXRImageTracking
- WebXRNearInteraction
- WebXRDomOverlay
- WebXRControllerMovement
- WebXRLightEstimation
- WebXREyeTracking
- WebXRWalkingLocomotion
- WebXRLayers
- WebXRDepthSensing
- WebXRSpaceWarp
- WebXRRawCameraAccess
- WebXRBodyTracking
- WebXRTrackedSources
Implements
Constructors
constructor
-
Construct a new (abstract) WebXR feature
Parameters
- _xrSessionManager: WebXRSessionManager
the xr session manager for this feature
Returns WebXRAbstractFeature
- _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
Accessors
attached
-
get attached(): boolean
Is this feature attached
Returns boolean
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
Parameters
Optionalforce: booleanshould attachment be forced (even when already attached)
Returns boolean
true if successful, false is failed or already attached
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
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
This is the base class for all WebXR features. Since most features require almost the same resources and callbacks, this class can be used to simplify the development Note that since the features manager is using the
IWebXRFeatureyou are in no way obligated to use this class