Class WebXREyeTracking
Hierarchy
-
WebXRAbstractFeature
- WebXREyeTracking
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a new instance of the XR eye tracking feature.
Parameters
-
_xrSessionManager: WebXRSessionManager
An instance of WebXRSessionManager.
Returns WebXREyeTracking
-
Properties
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
is DisposedSearch playground for isDisposed
Is this feature disposed?
Readonly on Eye Tracking Ended ObservableSearch playground for onEyeTrackingEndedObservable
This observable will notify registered observers when eye tracking ends
Readonly on Eye Tracking Frame Update ObservableSearch playground for onEyeTrackingFrameUpdateObservable
This observable will notify registered observers on each frame that has valid tracking
Readonly on Eye Tracking Started ObservableSearch playground for onEyeTrackingStartedObservable
This observable will notify registered observers when eye tracking starts
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
is Eye Gaze Valid
-
Returns whether the gaze data is valid or not
Returns boolean
true if the data is valid
Methods
attachSearch playground for attach
-
attach this feature
Parameters
-
Optional force: boolean
should attachment be forced (even when already attached)
Returns boolean
true if successful, false is failed or already attached
-
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
get Eye GazeSearch playground for getEyeGaze
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
The WebXR Eye Tracking feature grabs eye data from the device and provides it in an easy-access format. Currently only enabled for BabylonNative applications.