Model loading · interface
GltfDocument
Explained in Importing models.
interface GltfDocumentimport type { GltfDocument } from '@driftengine/assets';Properties
| Name | Type | Description |
|---|---|---|
assetoptional | { version?: string; generator?: string; } | |
sceneoptional | number | |
scenesoptional | { nodes?: number[]; }[] | |
nodesoptional | GltfNode[] | |
meshesoptional | { primitives: GltfPrimitive[]; name?: string; }[] | |
accessorsoptional | GltfAccessor[] | |
bufferViewsoptional | GltfBufferView[] | |
buffersoptional | { byteLength: number; uri?: string; }[] | |
materialsoptional | GltfMaterial[] | |
imagesoptional | GltfImage[] | |
texturesoptional | GltfTexture[] | |
extensionsRequiredoptional | string[] | Extensions the file states it cannot be read correctly without. |
extensionsUsedoptional | string[] | |
skinsoptional | GltfSkinDef[] | |
animationsoptional | GltfAnimationDef[] | |
extensionsoptional | { KHR_lights_punctual?: { lights?: GltfPunctualLight[]; }; } | The document's own lights, which nodes name by index. |