Constructor
new ExportToGLTF()
Create a GLTFExporter object and an anchor HTMLElement.
Classes
Methods
exportGLTF(input, params)
Export the scene to GLTF format.
Parameters:
Name | Type | Description |
---|---|---|
input |
THREE.Object3D | the scene to export. |
params |
Object | GLTFExporter.parse options. |
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params.trs |
boolean |
<optional> |
false | export position, rotation and scale instead of matrix per node. |
params.onlyVisible |
boolean |
<optional> |
true | export only visible objects. |
params.binary |
boolean |
<optional> |
false | export in binary (.glb) format, returning an ArrayBuffer. |
params.maxTextureSize |
number |
<optional> |
infinity | restricts the image maximum size (both width and height) to the given value. |
params.animations |
Array.<AnimationClip> |
<optional> |
null | a List of animations to be included in the export. |
params.includeCustomExtensions |
boolean |
<optional> |
false | export custom glTF extensions defined on an object's userData.gltfExtensions property. |
- Source:
- See:
save(blob, filename)
Save a blob to a file, which is a file-like object of immutable, raw data;
they can be read as text or binary data, or converted into a ReadableStream
so its methods can be used for processing the data.
Parameters:
Name | Type | Description |
---|---|---|
blob |
Blob | a file-like object of immutable, raw data. |
filename |
string | file name. |
- Source:
- See:
saveArrayBuffer(buffer, filename)
Save an array buffer to a file.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
ArrayBuffer | Blob as binary data. |
filename |
string | file name. |
- Source:
- See:
saveString(text, filename)
Save a string to a file.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Blob as JSON string. |
filename |
string | file name. |
- Source:
- See: