AssetsApi interface
The `assets` service: a shared cache of media and models with progress.
import type { AssetsApi } from '@dioramajs/diorama/assets'interface AssetsApiMembers
| Name | Type | Description |
|---|---|---|
readonly progress | ReadonlySignal<number> | Progress of the current wave of high and normal work, 0..1. Never goes back within a wave. |
acquire | | Get-or-create by key with a lease. Plugins share values they build this way (effects bitmaps). Errors of |
load | | Loads a URL and returns a lease at once. The type comes from |
pause | | Low-priority loads and decodes wait while any pause is held (a flight). |
preload | | Next page's media and models: URLs, a parsed Document (Astro, Swup) or a container (Barba). |
ready | | Settles when the current wave is done, or at once without one. Failures count as done. |
stats | | Counters of the cache. |
track | | Counts outside work in the current wave, like first-screen effects, fonts or page HTML. |
Also exported from @dioramajs/assets.
Defined in packages/assets/src/types.ts.