Interface: ResolvedAsset<T>
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:56
A fully resolved asset, with all the information needed to load it. This represents an asset that has been processed by the resolver and is ready to be loaded.
Example
// Basic resolved asset
const asset: ResolvedAsset = {
alias: ['hero'],
src: 'hero.png',
format: 'png'
};
// Resolved asset with multiple aliases
const asset: ResolvedAsset = {
alias: ['character', 'player'],
src: 'character@2x.webp',
format: 'webp',
};
// Resolved asset with specific parser
const asset: ResolvedAsset = {
alias: ['config'],
src: 'data.txt',
format: 'txt',
parser: 'text'
};
Standard
Type Parameters
T
T = any
Properties
alias?
> optional alias?: string[]
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:58
Array of alternative names for this asset. Used for looking up the same asset by different keys.
data?
> optional data?: T
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:65
Optional data passed to the asset loader. Can include texture settings, parser options, or other asset-specific data.
format?
> optional format?: string
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:67
File format of the asset, usually the file extension. Used to determine which loader parser to use.
~~loadParser?~~
> optional loadParser?: LoadParserName
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:71
Deprecated
Use parser instead.
parser?
> optional parser?: AssetParser
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:73
Override to specify which parser should load this asset. Useful when file extensions don't match the content type.
progressSize?
> optional progressSize?: number
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:79
The amount of progress an asset will contribute to the onProgress event when loading. This can be any arbitrary value but typically represents the file size.
Default
1
src?
> optional src?: string
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:60
The URL or relative path to the asset. This is the final, resolved path that will be used for loading.