aalavandhaann / blueprint-js

The Javascript es6 version of the original furnishup/blueprint3d. Need some royalty free low poly models for the inventory. Can someone help me with this?
MIT License
506 stars 158 forks source link

add function gltf exporter #54

Closed AWAIS97 closed 4 years ago

AWAIS97 commented 4 years ago

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

aalavandhaann commented 4 years ago

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

AWAIS97 commented 4 years ago

Okay I apologize for that. I tried this THREE.GltfExporter but this is also said THREE is not define need help

On Thu, Jul 16, 2020 at 3:28 PM #0K Srinivasan Ramachandran < notifications@github.com> wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aalavandhaann/blueprint-js/issues/54#issuecomment-659323092, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANECDJHRVYUV3RDKB4X6DO3R33I5VANCNFSM4O3R26JA .

aalavandhaann commented 4 years ago

Did you include threejs in the html script tag?

AWAIS97 commented 4 years ago

Now its give THREE.GLFTExporter is not a constructor

On Thu, Jul 16, 2020 at 8:51 PM #0K Srinivasan Ramachandran < notifications@github.com> wrote:

Did you include threejs in the html script tag?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aalavandhaann/blueprint-js/issues/54#issuecomment-659502044, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANECDJEYTIYSUTJB3CB5N3TR34OWXANCNFSM4O3R26JA .

AWAIS97 commented 4 years ago

When i include a script tag of GLFTExporter.js in html then "THREE.GLFTExporter is not a constructor " is gone but one more thing is occur that is

Uncaught (in promise) ReferenceError: downloadJSON is not defined at example.js:546 at GLTFExporter.js:2082

On Thu, Jul 16, 2020 at 9:47 PM Awais Hassan awaishassan1997@gmail.com wrote:

Now its give THREE.GLFTExporter is not a constructor

On Thu, Jul 16, 2020 at 8:51 PM #0K Srinivasan Ramachandran < notifications@github.com> wrote:

Did you include threejs in the html script tag?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aalavandhaann/blueprint-js/issues/54#issuecomment-659502044, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANECDJEYTIYSUTJB3CB5N3TR34OWXANCNFSM4O3R26JA .

AWAIS97 commented 4 years ago

When i include a script tag of GLFTExporter.js in html then "THREE.GLFTExporter is not a constructor " is gone but one more thing is occur that is

Uncaught (in promise) ReferenceError: downloadJSON is not defined at example.js:546 at GLTFExporter.js:2082

please help me with that

On Thu, Jul 16, 2020 at 10:02 PM Awais Hassan awaishassan1997@gmail.com wrote:

When i include a script tag of GLFTExporter.js in html then "THREE.GLFTExporter is not a constructor " is gone but one more thing is occur that is

Uncaught (in promise) ReferenceError: downloadJSON is not defined at example.js:546 at GLTFExporter.js:2082

On Thu, Jul 16, 2020 at 9:47 PM Awais Hassan awaishassan1997@gmail.com wrote:

Now its give THREE.GLFTExporter is not a constructor

On Thu, Jul 16, 2020 at 8:51 PM #0K Srinivasan Ramachandran < notifications@github.com> wrote:

Did you include threejs in the html script tag?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aalavandhaann/blueprint-js/issues/54#issuecomment-659502044, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANECDJEYTIYSUTJB3CB5N3TR34OWXANCNFSM4O3R26JA .