Class WebXREyeTracking
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXREyeTracking
Constructors
constructor
-
Creates a new instance of the XR eye tracking feature.
Parameters
- _xrSessionManager: WebXRSessionManager
An instance of WebXRSessionManager.
Returns WebXREyeTracking
- _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?
Readonlyon Eye Tracking Ended Observable
This observable will notify registered observers when eye tracking ends
Readonlyon Eye Tracking Frame Update Observable
This observable will notify registered observers on each frame that has valid tracking
Readonlyon Eye Tracking Started Observable
This observable will notify registered observers when eye tracking starts
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
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
is Eye Gaze Valid
-
get isEyeGazeValid(): boolean
Returns whether the gaze data is valid or not
Returns boolean
true if the data is valid
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
get Eye Gaze
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
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.