GLTFWriter
The GLTFWriter
is a writer for glTF scenegraphs.
Loader | Characteristic |
---|---|
File Extensions | .glb ,.gltf |
File Types | Binary, JSON, Linked Assets |
Data Format | Scenegraph |
File Format | glTF |
Supported APIs | encode , encodeSync |
Usage​
import {GLTFWriter} from '@loaders.gl/gltf';
import {encodeSync} from '@loaders.gl/core';
const arrayBuffer = encodeSync(gltf, GLTFWriter, options);
Options​
Option | Type | Default | Description |
---|---|---|---|
DracoWriter | DracoWriter | null | To enable DRACO encoding, the application needs to import and supply the DracoWriter class. |
DracoLoader | DracoLoader | null | To enable DRACO encoding, the application needs to import and supply the DracoLoader class. |