Skip to content
InterfaceAssets & Loading@public

FlxAssetBackend

Injectable subset of Pixi Assets used by the engine service.

ts
export interface FlxAssetBackend

Methods

add()

ts
add(asset: FlxAssetDescriptor | FlxAssetDescriptor[]): void

Parameters:

ParameterTypeDescription
assetFlxAssetDescriptor | FlxAssetDescriptor[]-

Returns: void

addBundle()

ts
addBundle(name: string, assets: FlxAssetDescriptor[]): void

Parameters:

ParameterTypeDescription
namestring-
assetsFlxAssetDescriptor[]-

Returns: void

backgroundLoad()

ts
backgroundLoad(ids: string | string[]): Promise<void>

Parameters:

ParameterTypeDescription
idsstring | string[]-

Returns: Promise<void>

backgroundLoadBundle()

ts
backgroundLoadBundle(names: string | string[]): Promise<void>

Parameters:

ParameterTypeDescription
namesstring | string[]-

Returns: Promise<void>

get()

ts
get<T>(id: string): T | undefined

Parameters:

ParameterTypeDescription
idstring-

Returns: T | undefined

init()

ts
init(options?: FlxAssetInitOptions): Promise<void>

Parameters:

ParameterTypeDescription
optionsFlxAssetInitOptions-

Returns: Promise<void>

load()

ts
load<T>(id: string | FlxAssetDescriptor, options?: FlxAssetLoadOptions): Promise<T>

Parameters:

ParameterTypeDescription
idstring | FlxAssetDescriptor-
optionsFlxAssetLoadOptions-

Returns: Promise<T>

loadBundle()

ts
loadBundle<T>(name: string | string[], onProgress?: (progress: number) => void): Promise<T>

Parameters:

ParameterTypeDescription
namestring | string[]-
onProgress(progress: number) => void-

Returns: Promise<T>

unload()

ts
unload(id: string | string[]): Promise<void>

Parameters:

ParameterTypeDescription
idstring | string[]-

Returns: Promise<void>

unloadBundle()

ts
unloadBundle(name: string | string[]): Promise<void>

Parameters:

ParameterTypeDescription
namestring | string[]-

Returns: Promise<void>

Released under the MIT License.