mwg API
    Preparing search index...

    Interface LoadAssetsOptions

    Actually fetching and decoding assets, which is the half that needs Pixi.

    Split from paths.ts so path resolution stays renderer-free: a game rendering through something other than Pixi (mwg/3d on Babylon) resolves paths through the same compiled asset map and hands the fetch to its own loader, rather than importing this file at all.

    import { load, texture, isLoaded, release } from '@datamoc/mwg/assets';

    await load(['tiles.png', 'data/level1.json']);
    const tilesTexture = texture('tiles.png');
    console.log(isLoaded('tiles.png')); // true

    await release(['tiles.png']); // frees the GPU texture once a zone is left for good
    interface LoadAssetsOptions {
        onMissing?: (path: string, error: unknown) => void;
        onProgress?: assetPaths.AssetProgress;
        optional?: readonly string[];
        resolution?: number;
    }
    Index
    onMissing?: (path: string, error: unknown) => void

    called once per optional path that failed to load, with whatever Assets.load threw

    item 135's LoadQueue/LoadingScreen seam: 0 to 1 across the batch

    optional?: readonly string[]

    Paths a game can do without - a portrait variant, an optional decal - loaded separately from the rest of the batch so one missing file never aborts every other asset the batch was loading. A path in here that fails to load is simply left unloaded: isLoaded reports false for it and texture's fallback argument (or get's) is what a caller reads instead, rather than every caller writing its own try/catch around load().

    resolution?: number

    Rasterize vector sources (SVG, item 15) at this multiple of their intrinsic size. An SVG loaded once is a bitmap from then on, so a game that zooms in either asks for a bigger rasterization here or ships a soft texture; 2 doubles both dimensions, so the texture is crisp up to 2x zoom. Raster formats ignore it. Omit for the loader's own default, which is the SVG's intrinsic size.