Skip to content

Interface: IAssetLoader ​

Core interface types.

Methods ​

Get() ​

ts
Get<T>(id): T | undefined;

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
idstring

Returns ​

T | undefined


GetDescriptor() ​

ts
GetDescriptor(id): AssetDescriptor | undefined;

Parameters ​

ParameterType
idstring

Returns ​

AssetDescriptor | undefined


GetDescriptors() ​

ts
GetDescriptors(): AssetDescriptor[];

Every descriptor registered so far, loaded or in flight. Editor asset browsers read this.

Returns ​

AssetDescriptor[]


GetSpritesheetAnimations()? ​

ts
optional GetSpritesheetAnimations(spritesheetAssetId): Record<string, string[]> | undefined;

Map of animation name → frame ids, from a TexturePacker 'animations' block.

Parameters ​

ParameterType
spritesheetAssetIdstring

Returns ​

Record<string, string[]> | undefined


GetSpritesheetFrames()? ​

ts
optional GetSpritesheetFrames(spritesheetAssetId): string[] | undefined;

Parameters ​

ParameterType
spritesheetAssetIdstring

Returns ​

string[] | undefined


Init() ​

ts
Init(baseUrl?): Promise<void>;

Parameters ​

ParameterType
baseUrl?string

Returns ​

Promise<void>


IsLoaded() ​

ts
IsLoaded(id): boolean;

Parameters ​

ParameterType
idstring

Returns ​

boolean


Load() ​

ts
Load(descriptors, onProgress?): Promise<void>;

Parameters ​

ParameterType
descriptorsreadonly AssetDescriptor[]
onProgress?(p) => void

Returns ​

Promise<void>


LoadOne() ​

ts
LoadOne(descriptor): Promise<void>;

Parameters ​

ParameterType
descriptorAssetDescriptor

Returns ​

Promise<void>


SliceTextureGrid()? ​

ts
optional SliceTextureGrid(sourceAssetId, options): string[] | undefined;

Optional capabilities — return undefined when the backend lacks the needed pipeline.

Parameters ​

ParameterType
sourceAssetIdstring
optionsTextureGridSliceOptions

Returns ​

string[] | undefined


Unload() ​

ts
Unload(id): Promise<void>;

Parameters ​

ParameterType
idstring

Returns ​

Promise<void>


UnloadAll() ​

ts
UnloadAll(): Promise<void>;

Returns ​

Promise<void>

© 2026 PlayAdGentic