pixi-jsInterfaces
Interface: AssetsBundle
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:258
Structure of a bundle found in a AssetsManifest file. Bundles allow you to group related assets together for easier management and loading.
Example
// Basic bundle structure
const bundle: AssetsBundle = {
name: 'level-1',
assets: [
{
alias: 'background',
src: 'level1/bg.{webp,png}'
},
{
alias: 'sprites',
src: 'level1/sprites.json'
}
]
};
// Using object format for assets
const bundle: AssetsBundle = {
name: 'ui',
assets: {
button: 'ui/button.png',
panel: 'ui/panel.png',
icons: ['ui/icons.webp', 'ui/icons.png']
}
};
See
- Assets.addBundle For adding bundles programmatically
- Assets.loadBundle For loading bundles
Standard
Properties
assets
> assets: UnresolvedAsset<any>[] | Record<string, ArrayOr<string> | UnresolvedAsset<any>>
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:262
Assets contained in the bundle. Can be an array of assets or a record mapping aliases to sources.
name
> name: string
Defined in: node_modules/pixi.js/lib/assets/types.d.ts:260
Unique identifier for the bundle