[name]

An exporter for *glTF* 2.0.

glTF (GL Transmission Format) is an open format specification for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) or binary (.glb) format. External files store textures (.jpg, .png, ...) and additional binary data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials, textures, skins, skeletons, morph targets, animations, lights, and/or cameras.

Example

// Instantiate a exporter var exporter = new THREE.GLTFExporter( defaultOptions ); // Parse the input and generate the glTF output exporter.parse( scene, function ( gltf ) { console.log( gltf ); downloadJSON( gltf ); }, options ); [example:misc_exporter_gltf]

Constructor

[name]( )

Creates a new [name].

Methods

[method:null parse]( [param:Object input], [param:Function onCompleted], [param:Object options] )

[page:Object input] — Scenes or objects to export. Valid options:
[page:Function onCompleted] — Will be called when the export completes. The argument will be the generated glTF JSON or binary ArrayBuffer.
[page:Options options] - Export options
Generates a .gltf (JSON) or .glb (binary) output from the input (Scene or Objects)

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/GLTFExporter.js examples/js/exporters/GLTFExporter.js]