Overview
GltfImporter reads a glTF (.gltf/.glb) file or binary buffer and reconstructs its scene graph as Aspose.3D for TypeScript objects including nodes, meshes, materials, and animations. It is invoked automatically by Scene.open() when the source file has the .gltf extension or when a GltfLoadOptions instance is provided explicitly. Pass GltfLoadOptions to control which node hierarchies are loaded, how materials are resolved, and whether animation tracks are included during import.
Properties
| Name | Type | Access | Description |
|---|
json | : GltfData | Read | Holds the parsed JSON structure of the GLTF file as a GltfData object |
binary | : Buffer | null | Read | Contains the binary buffer of the GLTF file, or null if no binary chunk exists |
Methods
| Signature | Description |
|---|
constructor() | Creates a new instance of the GLTF importer |
supportsFormat(fileFormat: FileFormat) → boolean | |
importScene(scene: Scene, stream: Buffer | Uint8Array, options: LoadOptions) | Loads GLTF data from a Buffer/Uint8Array into the provided Scene using LoadOptions |
See Also