Model loading · function
assetCandidates
Paths to try for a reference, best first, relative to the folder holding the model.
Explained in Importing models.
function assetCandidates(declared: string, subfolders?: readonly string[]): string[]import { assetCandidates } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
declared | string | |
subfolders? | readonly string[] |
In depth
Deduplicated, because a texture declared as plain carbon.jpg would otherwise produce the
same candidate three times, and a host that logs its attempts would report three failures
for one missing file.
subfolders are the conventional places a bundle puts its images. They are tried with the
basename only, and last, so they can never outrank a path the file actually stated.