import { AssetManifest } from '@energy8platform/platform-core'; export { AssetBundle, AssetEntry, AssetManifest } from '@energy8platform/platform-core'; /** * Manages game asset loading with progress tracking, bundle support, and * automatic base path resolution from SDK's assetsUrl. * * Wraps PixiJS Assets API with a typed, game-oriented interface. * * @example * ```ts * const assets = new AssetManager('https://cdn.example.com/game/', manifest); * await assets.init(); * await assets.loadBundle('preload', (p) => console.log(p)); * const texture = assets.get('hero'); * ``` */ declare class AssetManager { private _initialized; private _basePath; private _manifest; private _loadedBundles; constructor(basePath?: string, manifest?: AssetManifest); /** Whether the asset system has been initialized */ get initialized(): boolean; /** Base path for all assets (usually from SDK's assetsUrl) */ get basePath(): string; /** Set of loaded bundle names */ get loadedBundles(): ReadonlySet; /** * Initialize the asset system. * Must be called before loading any assets. */ init(): Promise; /** * Load a single bundle by name. * * @param name - Bundle name (must exist in the manifest) * @param onProgress - Progress callback (0..1) * @returns Loaded assets map */ loadBundle(name: string, onProgress?: (progress: number) => void): Promise>; /** * Load multiple bundles simultaneously. * Progress is aggregated across all bundles. * * @param names - Bundle names * @param onProgress - Progress callback (0..1) */ loadBundles(names: string[], onProgress?: (progress: number) => void): Promise>; /** * Load individual assets by URL or alias. * * @param urls - Asset URLs or aliases * @param onProgress - Progress callback (0..1) */ load(urls: string | string[], onProgress?: (progress: number) => void): Promise; /** * Get a loaded asset synchronously from cache. * * @param alias - Asset alias * @throws if not loaded */ get(alias: string): T; /** * Unload a bundle to free memory. */ unloadBundle(name: string): Promise; /** * Start background loading a bundle (low-priority preload). * Useful for loading bonus round assets while player is in base game. */ backgroundLoad(name: string): Promise; /** * Get all bundle names from the manifest. */ getBundleNames(): string[]; /** * Check if a bundle is loaded. */ isBundleLoaded(name: string): boolean; private ensureInitialized; } export { AssetManager };