import type { WebXRImageTrackingModel } from "./WebXRImageTracking.js"; /** * Cache of decoded marker bitmaps, keyed by image url. * Also read by the USDZ exporter (see {@link WebXRImageTracking}) to embed the marker into the .usdz. */ export declare const _imageElements: Map; /** * Resolve marker bitmaps for the given tracked-image models and append them to `args.trackedImages` * (the list handed to `navigator.xr.requestSession`). * * Every valid marker is awaited so that images which are still decoding when the XR session is * requested get included instead of being silently dropped (which previously caused markers to only * work after re-entering AR). Loading happens in parallel and never rejects: a marker that can not be * loaded is skipped individually so a single unavailable image can not fail the whole session request. * * @param models The configured tracked-image models * @param args The session init object; `trackedImages` is created if missing and appended to * @param load Injectable loader (defaults to {@link loadImage}); resolves the decoded bitmap or null * @returns Map of `trackedImages` index -> model for the appended images (used to resolve results) */ export declare function collectTrackedImages(models: readonly WebXRImageTrackingModel[] | undefined | null, args: { trackedImages?: Array<{ image: ImageBitmap; widthInMeters: number; }>; }, load?: (url: string) => Promise): Promise>; /** * Load and decode a marker image into an {@link ImageBitmap}, caching it in {@link _imageElements}. * Idempotent: concurrent or repeated calls for the same URL share a single in-flight load. * * Resolves to `null` and never rejects when the image can not be fetched or decoded, so callers can * skip an unavailable marker without failing the surrounding XR session request. A failed load clears * its cache entry so a later attempt (e.g. re-entering AR) can retry. */ export declare function loadImage(url: string): Promise;