Sign in to follow this  
dbawel

ImportMesh isn't loading my .babylon file

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

Share this post


Link to post
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();

Share this post


Link to post
Share on other sites

Oh I bet it means your file was 404ing Dave, and for mine I was trying to import a mesh as a dataURI and forgot to convert it back before I imported it.

*figured mine out*

 

Id like to tell you more but your link is not live db.

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.