Jump to content

3d object loading error


Anmolbhagat
 Share

Recommended Posts

Hello,

 

This is the first time i was trying to implement 3d object in html with babylon.js

 

As i load the object with the following script -

BABYLON.SceneLoader.Load("", "box.babylon", engine, function (newScene){ 
 
Scene = newScene;
Scene.executeWhenReady(function(){
Scene.activeCamera.attachControl(canvas);
 
engine.runRenderLoop(function(){
Scene.render();
 
});
});
 
});
 
I get the below error -

Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///D:/Amol%20data/Hitachi/HTML5/box.babylon'.

 

Thanks.

Link to comment
Share on other sites

Hi,

 

 You need a Web Server (IIS or Apache) to host the 3D content. You can't load directly from the file system. Free free to have a look to our Wiki: https://github.com/babylonjs/babylon.js/wiki

 

 It contains a link to an article explaining how to do that: http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx

 

 We've got also a great free video course available on MVA: http://www.microsoftvirtualacademy.com/training-courses/introduction-to-webgl-3d-with-html5-and-babylon-js

 

 Finally, you can test directly your assets by drag'n'dropping them into our Sandbox tool: http://www.babylonjs.com/sandbox 

 

Bye,

 

David

Link to comment
Share on other sites

Hi,

 

 You need a Web Server (IIS or Apache) to host the 3D content. You can't load directly from the file system. Free free to have a look to our Wiki: https://github.com/babylonjs/babylon.js/wiki

 

 It contains a link to an article explaining how to do that: http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx

 

 We've got also a great free video course available on MVA: http://www.microsoftvirtualacademy.com/training-courses/introduction-to-webgl-3d-with-html5-and-babylon-js

 

 Finally, you can test directly your assets by drag'n'dropping them into our Sandbox tool: http://www.babylonjs.com/sandbox 

 

Bye,

 

David

 

Thanks a ton for your replies. I will test with the given solution...

Thanks

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