Jump to content

Trying to import mesh: Uncaught TypeError: Cannot read property '_addPendingData' of undefined


startec
 Share

Recommended Posts

Hi, I am very simply trying to upload a basic scene, following this http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx tutorial .  However, what I really want to do is load the meshes separately as the end of the tutorial describes.

 

For some reason I keep getting a "Uncaught TypeError: Cannot read property '_addPendingData' of undefined"

error.

 

I have uploaded the entire scene to sandbox and as a scene file in babylon, but it doesn't seem to work to import individual meshes.  Does anyone know why this could be?

 

I have attached the blender file, and here is my code:

 

 

Thank you!

var sphere;                                                                                                                                                                                               var ground;                                                                                                                                                                                               var newScene;                                                                                                                                                                                                                                                                                                                                                                                                       window.addEventListener('DOMContentLoaded', function () {                                                                                                                                                   var canvas = document.getElementById('renderCanvas');                                                                                                                                                     var engine = new BABYLON.Engine(canvas, true);                                                                                                                                                                                                                                                                                                                                                                      var createScene = function () {                                                                                                                                                                                                                                                                                                                                                                                       BABYLON.SceneLoader.ImportMesh("", "", "first.babylon", scene, function (newMeshes) {                                                                                                                         console.log(newMeshes);                                                                                                                                                                                   engine.runRenderLoop(function () {                                                                                                                                                                          newScene.render();                                                                                                                                                                                      });                                                                                                                                                                                                   });                                                                                                                                                                                                       return scene;                                                                                                                                                                                           };                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            var scene = createScene();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }, false);   

Well, i am not permitted to upload a .babylon file, so here is a public url:

http://www12.zippyshare.com/v/wS6IaJdQ/file.html

Thanks for any help.

 

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...