Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

Properties

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposed: boolean

Is this feature disposed?

onTrackableImageFoundObservable: Observable<IWebXRTrackedImage>

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

onTrackedImageUpdatedObservable: Observable<IWebXRTrackedImage>

The image was found and its state was updated.

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.

read-only options to be used in this module

xrNativeFeatureName: string

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

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

The module's name

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

  • get attached(): boolean
  • Is this feature attached

    Returns boolean

Methods

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

    Returns boolean

    true if successful.

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

    Returns boolean

    true if successful.

  • dispose(): void
  • Dispose this feature and all of the resources attached

    Returns void

  • 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

  • Extends the session init object if needed

    Returns Promise<Partial<XRSessionInit>>

    augmentation object fo the xr session init object.

  • 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
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme