Anmolbhagat Posted December 9, 2014 Share Posted December 9, 2014 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. Quote Link to comment Share on other sites More sharing options...
davrous Posted December 9, 2014 Share Posted December 9, 2014 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 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 9, 2014 Share Posted December 9, 2014 You need to describe how you are doing this. I am able double click an HTMl file which loads a .babylon scene from either Ubuntu's or OSX's "NT Explorer", no problem. This changed around June, I think. Am positive I did with Windows 7 too. Quote Link to comment Share on other sites More sharing options...
Anmolbhagat Posted December 10, 2014 Author Share Posted December 10, 2014 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.