Model loading · interface
ModelImport
What a reader found, before anything is oriented, welded or written.
Explained in Importing models.
interface ModelImportimport type { ModelImport } from '@driftengine/assets';Properties
| Name | Type | Description |
|---|---|---|
meshes | MeshData[] | |
warnings | string[] | Caveats a person should read: an experimental reader, a missing axis convention. |
notes | string[] | Informational lines, worth printing and not worth worrying about. |
declaredUpoptional | UpAxis | What the file says is up, where the format says anything at all. |
materialsoptional | DrftMaterial[] | One per mesh, by ordinal, when the format carries materials. |
substancesoptional | { material: number; substance: string; }[] | Which substance each material is made of, from a glTF material's extras.substance.MoreAbsent for every other format and for a glTF that labels nothing, which is the same
all-or-nothing shape |
texturesoptional | AssetReference[] | Textures the model named, with bytes in hand where it carried them inline. |
unitScaleoptional | number | Metres per source unit, when the format states one. USD and FBX do; nothing else here does. |
skinsoptional | readonly DrftSkin[] | Skins and clips, where the format carries them. glTF and FBX do; nothing else here does.MoreOptional, so every reader that knows nothing about rigs stays exactly as it was — the same
reason |
clipsoptional | readonly AnimationClip[] | |
nodesoptional | readonly DrftNode[] | The asset's own hierarchy, where the format carries one. Absent for a format with none.More
|
lightsoptional | readonly DrftLight[] | The lights the file was authored with, in world space. glTF carries them; nothing else here. |
declaredHandoptional | Handedness | Which way round the source's coordinate system was. orient.ts is what acts on it. |
approximationsoptional | readonly string[] | Where the reader knows its result differs from what the authoring tool would export: a node
graph glTF cannot hold, animation it does not read. Drawn anyway, and named.MoreAbsent for every format but |