Represents a tracked image detected during a WebXR session. Contains position, rotation, and tracking state information for a detected marker image.

Properties:

  • Access image URL and physical dimensions
  • Get current position and rotation in world space
  • Check tracking state (tracked vs emulated)
  • Apply transform to 3D objects

Constructors

Properties

measuredSize: number

The measured size of the detected image in the real world. May differ from widthInMeters if the physical marker doesn't match the configured size.

state: "tracked" | "emulated"

Current tracking state of the image:

  • tracked - Image is currently being tracked by the system
  • emulated - Tracking is being emulated (less accurate)

Accessors

  • get url(): string

    URL of the tracked marker image

    Returns string

  • get widthInMeters(): number

    Physical width of the marker in meters

    Returns number

Methods

  • Apply the tracked image's position and rotation to a 3D object. Optionally applies smoothing to reduce jitter.

    Parameters

    • object: Object3D

      The 3D object to update

    • t01: undefined | number = undefined

      Interpolation factor (0-1) for smoothing. If undefined or >= 1, no smoothing is applied. When smoothing is enabled, larger position/rotation changes will automatically reduce the smoothing to prevent lag.

    Returns void

  • Copy the current world position of the tracked image to a Vector3.

    Parameters

    • vec: Vector3

      The vector to store the position in

    Returns Vector3

    The input vector with the position copied to it

  • Copy the current world rotation of the tracked image to a Quaternion.

    Parameters

    • quat: Quaternion

      The quaternion to store the rotation in

    Returns Quaternion

    The input quaternion with the rotation copied to it