Jump to content

ImportMesh isn't loading my .babylon file


dbawel
 Share

Recommended Posts

Hello,

I cannot get a .babylon file to load using ImportMesh. 

Please take a look if you can.

http://qedsoft.com/DEMOS2017/bjs_loader/index4.html

I do receive a console error:

Quote

Uncaught TypeError: scene._addPendingData is not a function
    at Function.SceneLoader.ImportMesh (babylon.max.js:sourcemap:53587)
    at createScene (index4.html:60)
    at index4.html:90

But am not doing anything different than I've repeatedly done in the past. Perhaps I'm not identifying an attribute correctly?

Thanks,

DB

Link to comment
Share on other sites

* I second this!  I had this error today as well, when using SceneLoader.ImportMesh 

use this for now Dave:

var loader = new BABYLON.AssetsManager(scene);
                        var task = loader.addMeshTask("blah", "", "./", "blah.obj");
                        fishTask.onSuccess = (task)=>{
                            var meshes = task.loadedMeshes;
                            for(var i=0; i<meshes.length; i++){
                                var _m = meshes;
                                     //do something

                                }
                        }
                        loader.load();

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...