Class WebXRImageTracking
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXRImageTracking
Constructors
constructor
-
new WebXRImageTracking(
_xrSessionManager: WebXRSessionManager,
options: IWebXRImageTrackingOptions,
): WebXRImageTrackingconstructs the image tracking feature
Parameters
- _xrSessionManager: WebXRSessionManager
the session manager for this module
- options: IWebXRImageTrackingOptions
read-only options to be used in this module
Returns WebXRImageTracking
- _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 Trackable Image Found Observable
An image was deemed trackable, and the system will start tracking it.
on Tracked Image Updated Observable
The image was found and its state was updated.
on Untrackable Image Found Observable
This will be triggered if the underlying system deems an image untrackable. The index is the index of the image from the array used to initialize the feature.
Readonlyoptions
read-only options to be used in this module
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
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
Returns boolean
true if successful.
detach
-
detach this feature. Will usually be called by the features manager
Returns boolean
true if successful.
dispose
-
Dispose this feature and all of the resources attached
Returns void
get Tracked Image By Id
-
Get a tracked image by its ID.
Parameters
- id: number
the id of the image to load (position in the init array)
Returns Nullable<IWebXRTrackedImage>
a trackable image, if exists in this location
- id: number
get XR Session Init Extension
-
Extends the session init object if needed
Returns Promise<XRSessionInit>
augmentation object fo 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
Image tracking for immersive AR sessions. Providing a list of images and their estimated widths will enable tracking those images in the real world.