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.


GLTFExporter supports the following glTF 2.0 extensions:


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



Creates a new GLTFExporter.


.parse (input : Object3D, onCompleted : Function, options : Object) : null

input — Scenes or objects to export. Valid options:

onCompleted — Will be called when the export completes. The argument will be the generated glTF JSON or binary ArrayBuffer.
options — Export options

Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)


For more info on how to obtain the source code of this module see this page.