pixi.js
    Preparing search index...

    Interface UnresolvedAsset<T>

    An asset that has not been resolved yet. This is the initial format used when adding assets to the Assets system before they are processed into a ResolvedAsset.

    // Basic unresolved asset
    const asset: UnresolvedAsset = {
    alias: 'hero',
    src: 'hero.png'
    };

    // Multiple aliases and formats
    const asset: UnresolvedAsset = {
    alias: ['hero', 'player'],
    src: 'hero.{webp,png}',
    data: {
    scaleMode: 'nearest',
    }
    };

    // Asset with multiple sources and formats
    const asset: UnresolvedAsset = {
    alias: 'background',
    src: [
    'bg@2x.webp',
    'bg@1x.webp',
    'bg@2x.png',
    'bg@1x.png',
    ]
    };

    // With specific loader
    const asset: UnresolvedAsset = {
    alias: 'config',
    src: 'data.txt',
    loadParser: 'loadTxt'
    };
    • Used as input format when adding assets to the system
    • Can specify multiple aliases for the same asset
    • Supports format patterns for browser compatibility
    • Can include loader-specific data and options
    interface UnresolvedAsset<T = any> {
        alias?: ArrayOr<string>;
        data?: T;
        format?: string;
        loadParser?: LoadParserName;
        src?: AssetSrc;
        [key: string]: any;
    }

    Type Parameters

    • T = any

    Indexable

    • [key: string]: any
    Index

    Properties

    alias?: ArrayOr<string>

    Aliases associated with asset

    data?: T

    Optional data passed to the asset loader. Can include texture settings, parser options, or other asset-specific data.

    format?: string

    File format of the asset, usually the file extension. Used to determine which loader parser to use.

    loadParser?: LoadParserName

    Override to specify which parser should load this asset. Useful when file extensions don't match the content type.

    src?: AssetSrc

    The URL or relative path to the asset