Overview
GltfExporter converts an in-memory Scene graph into glTF (.gltf/.glb) format and writes the result to a file path or output stream. It is invoked automatically by Scene.save() when the target file extension is .gltf or when a GltfSaveOptions instance is passed explicitly to control output. Pass a GltfSaveOptions object to govern serialisation details such as coordinate-system handedness, vertex precision, and optional format-specific extensions during the export operation.
Properties
| Name | Type | Access | Description |
|---|
min | : number[] | Read | Holds the minimum coordinate values of the exported scene’s bounding box |
max | : number[] | Read | Provides the maximum bounds of the exported data (duplicate entry) |
x | : number | Read | Stores the X component of an internal vector used during export |
y | : number | Read | Stores the Y component of a secondary vector used during export |
z | : number | Read | |
w | : number | Read | |
x | : number | Read | Stores the X component of an internal vector used during export |
y | : number | Read | Stores the Y component of a secondary vector used during export |
z | : number | Read | |
x | : number | Read | Stores the X component of an internal vector used during export |
y | : number | Read | Stores the Y component of a secondary vector used during export |
min | : number[] | Read | Holds the minimum coordinate values of the exported scene’s bounding box |
max | : number[] | Read | Provides the maximum bounds of the exported data (duplicate entry) |
Methods
| Signature | Description |
|---|
constructor() | |
supportsFormat(fileFormat: FileFormat) → boolean | Returns true if the exporter can handle the specified FileFormat |
export(scene: Scene, stream: any, options: SaveOptions) | Writes the given Scene to the provided stream using the supplied SaveOptions |
See Also