aalavandhaann/blueprint-js

add function gltf exporter

AWAIS97 opened this issue · 6 comments

I used blueprint3d.js and i want to add glft exporter function.When include this function in example.js file and i get some error in my console like GLTFExporter is not define.Can you help me with that

//gltf exporter
  function SaveDesign() {
    var data = blueprint3d.model.exportSerialized();
    var exporter = new GLTFExporter();
    exporter.parse(data, function (result) {
      var output = JSON.stringify(result, null, 2);
      console.log(output);
      downloadJSON(output, "scene.gltf");
    });
  }

Thanks

Change GltfExporter to THREE.GltfExporter. This is not the place for queries on threejs API.

Did you include threejs in the html script tag?