shaharyar.ahmed Posted December 30, 2013 Share Posted December 30, 2013 I was following the tutorial http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx to use ".babylon" files in babylon.js. I downloaded the source files and uploaded them to http://www.000webhost.com/ (a free web hosting site). I also added the MIME types to the ".htaccess" file:AddType application/fx .fxAddType application/babylon .babylonAddType application/babylonmeshdata .babylonmeshdataBut when I tried "loadScene.html" file, I got the error: http://i.stack.imgur.com/xJ5cE.png Then I asked about this error on stackoverflow.com and found that I need to add header to make cross origin requests, then I add this line to ".htaccess" file:Header add Access-Control-Allow-Origin "*"But still I have the same errors. Please help me sort it out, I've no idea what to do and how to do. Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2013 Share Posted December 30, 2013 Hello, Can you please share the URL of your website ?I think the error is in your loading code... Quote Link to comment Share on other sites More sharing options...
shaharyar.ahmed Posted December 30, 2013 Author Share Posted December 30, 2013 Here is the link http://developerslink.net16.net/loadScene.html Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2013 Share Posted December 30, 2013 Here is the error i have :GET http://developerslink.net16.net/scene.babylon.manifest babylon.js:22Error on XHR send request. This errors means your scene scene.babylon is not found. You should upload it like you did with all your source files. Quote Link to comment Share on other sites More sharing options...
shaharyar.ahmed Posted December 30, 2013 Author Share Posted December 30, 2013 Now the files are perfectly working but the error is still there: https://dl.dropboxusercontent.com/u/60669006/Capture.PNG Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2013 Share Posted December 30, 2013 Babylon will first try to load a manifest file associated to your babylon scene, as described here : https://github.com/BabylonJS/Babylon.js/wiki/Caching-the-resources-in-IndexedDBI guess the error you got is because this file does not exists in your folder. Can you try to add this file to check if this error disapears ? Quote Link to comment Share on other sites More sharing options...
shaharyar.ahmed Posted December 30, 2013 Author Share Posted December 30, 2013 The file exists there, all files are in the same folder. As you can see in the image that the file is working but error is still there. Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2013 Share Posted December 30, 2013 Sorry, my last post was not very clear... Can you please add on your FTP a file called : Res-Buiilding-3_archive3d.babylon.manifestThis file should contain only one line : { "version" : 1, "enableSceneOffline" : true, "enableTexturesOffline" : true }Please add this file and check if this error still appears. Quote Link to comment Share on other sites More sharing options...
shaharyar.ahmed Posted December 30, 2013 Author Share Posted December 30, 2013 No.. the error has gone now. See this: https://dl.dropboxusercontent.com/u/60669006/Capture2.PNG What was this? Please explain it Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2013 Share Posted December 30, 2013 When you load a custom scene, Babylon will first try to retrieve the scene manifest file. This manifest file is used to enable offline support, as described here : https://github.com/BabylonJS/Babylon.js/wiki/Caching-the-resources-in-IndexedDB. As you can see, enable offline support is not mandatory.The manifest file is loaded via a XHR send request, but as it not mandatory, the XHR request can fail. ==> In this case, an error message is displayed (like the one you got previously), and the scene is retrieved from the webserver. The error message only indicates the manifest file has not been found. If the manifest file exists, the scene is loaded from a IndexedDB database (if possible). Don't forget to tag your post as "resolved" 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.