Abstract Class: AssetSource
Defined in: packages/minerender/src/assets/source/AssetSource.ts:7
An asset provider registered with AssetLoader.addSource.
Extended by
Accessors
cacheId
Get Signature
get cacheId(): Maybe<string>;Defined in: packages/minerender/src/assets/source/AssetSource.ts:25
Identifies this source's content across sessions for persistent caching. Sources that cannot tell whether their content changed (an unnamed archive, for example) return undefined, which keeps their results out of long-lived caches.
Returns
Maybe<string>
Methods
blocks()
blocks(key): boolean | Promise<boolean>;Defined in: packages/minerender/src/assets/source/AssetSource.ts:16
Whether this source prevents lower-priority sources from supplying the key. Its own assets remain available.
Parameters
| Parameter | Type |
|---|---|
key | AssetKey |
Returns
boolean | Promise<boolean>
get()
abstract get<T>(key, parser): Promise<Maybe<T>>;Defined in: packages/minerender/src/assets/source/AssetSource.ts:13
Returns a parsed asset, or undefined to allow fallback. Load and parse failures should reject.
Type Parameters
| Type Parameter |
|---|
T extends MinecraftAsset |
Parameters
| Parameter | Type |
|---|---|
key | AssetKey |
parser | string |
Returns
Promise<Maybe<T>>