/** * Handles asynchronous loading of assets like images. */ export default class ResourceLoader { /** Internal helper to access the global shared state. */ private static get _state(); private static get assets(); private static get loadingQueue(); private static get totalToLoad(); private static set totalToLoad(value); private static get loadedCount(); private static set loadedCount(value); /** * Queue an image for loading. * @param tag Unique tag to reference the image later. * @param src Path to the image file. */ static queueImage(tag: string, src: string): void; /** * Start loading all queued assets. * @param onProgress Optional callback for loading progress updates. */ static loadAll(onProgress?: (percent: number) => void): Promise; /** * Get a loaded asset by its tag. * @param tag The tag used when queuing the asset. * @returns The loaded HTMLImageElement. */ static getImage(tag: string): HTMLImageElement; /** * Returns all loaded assets. * @returns An array of { tag, image } objects. */ static getLoadedAssets(): { tag: string; image: HTMLImageElement; }[]; /** * Clears all loaded assets and the loading queue. */ static clear(): void; }