Variable: assets
ts
const assets: {
ready(): Promise<void>;
resolve(ref): Promise<ResolvedAsset>;
url(ref): string;
load(ref): Promise<Blob>;
loadTexture(ref): Promise<Texture<TextureSource<any>>>;
loadAudio(ref): Promise<HTMLAudioElement>;
};Asset helpers backed by the global SuityAssets SDK (suity-assets.js).
Call assets.ready() before using key-based helpers. Textures are loaded on the main thread so editor preview service-worker routing works.
Type Declaration
| Name | Type | Description |
|---|---|---|
ready() | () => Promise<void> | Waits for the asset manifest/SDK to be ready. |
resolve() | (ref) => Promise<ResolvedAsset> | Resolves an Addressable Key/uid to { uid, url, ... }. |
url() | (ref) => string | Returns the URL for an already-resolved key/uid. |
load() | (ref) => Promise<Blob> | Loads the asset bytes. |
loadTexture() | (ref) => Promise<Texture<TextureSource<any>>> | Loads a texture through Pixi Assets. |
loadAudio() | (ref) => Promise<HTMLAudioElement> | Creates an HTMLAudioElement for an audio asset. |
