GltfExporter

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

NameTypeAccessDescription
min: number[]ReadHolds the minimum coordinate values of the exported scene’s bounding box
max: number[]ReadProvides the maximum bounds of the exported data (duplicate entry)
x: numberReadStores the X component of an internal vector used during export
y: numberReadStores the Y component of a secondary vector used during export
z: numberRead
w: numberRead
x: numberReadStores the X component of an internal vector used during export
y: numberReadStores the Y component of a secondary vector used during export
z: numberRead
x: numberReadStores the X component of an internal vector used during export
y: numberReadStores the Y component of a secondary vector used during export
min: number[]ReadHolds the minimum coordinate values of the exported scene’s bounding box
max: number[]ReadProvides the maximum bounds of the exported data (duplicate entry)

Methods

SignatureDescription
constructor()
supportsFormat(fileFormat: FileFormat)booleanReturns 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