Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebXRImageTracking

Image tracking for immersive AR sessions. Providing a list of images and their estimated widths will enable tracking those images in the real world.

Hierarchy

Implements

Index

Constructors

constructor

Properties

disableAutoAttachSearch playground for disableAutoAttach

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposedSearch playground for isDisposed

isDisposed: boolean

Is this feature disposed?

onTrackableImageFoundObservableSearch playground for onTrackableImageFoundObservable

onTrackableImageFoundObservable: Observable<IWebXRTrackedImage>

An image was deemed trackable, and the system will start tracking it.

onTrackedImageUpdatedObservableSearch playground for onTrackedImageUpdatedObservable

onTrackedImageUpdatedObservable: Observable<IWebXRTrackedImage>

The image was found and its state was updated.

onUntrackableImageFoundObservableSearch playground for onUntrackableImageFoundObservable

onUntrackableImageFoundObservable: Observable<number>

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.

Readonly optionsSearch playground for options

read-only options to be used in this module

xrNativeFeatureNameSearch playground for xrNativeFeatureName

xrNativeFeatureName: string

The name of the native xr feature name (like anchor, hit-test, or hand-tracking)

Static Readonly NameSearch playground for Name

Name: "xr-image-tracking" = "xr-image-tracking"

The module's name

Static Readonly VersionSearch playground for Version

Version: 1 = 1

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

Methods

attachSearch playground for attach

  • attach(): boolean
  • attach this feature Will usually be called by the features manager

    Returns boolean

    true if successful.

detachSearch playground for detach

  • detach(): boolean
  • detach this feature. Will usually be called by the features manager

    Returns boolean

    true if successful.

disposeSearch playground for dispose

  • dispose(): void

getTrackedImageByIdSearch playground for getTrackedImageById

  • 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

getXRSessionInitExtensionSearch playground for getXRSessionInitExtension

  • Extends the session init object if needed

    Returns Promise<Partial<XRSessionInit>>

    augmentation object fo the xr session init object.

isCompatibleSearch playground for isCompatible

  • isCompatible(): boolean
  • 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

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method