mecanicus Posted January 2, 2018 Share Posted January 2, 2018 Hello, I'm trying to load a babylon file on the playground but without success. I get two errors including "[20:24:54]: Unable to load from http://up11.servehttp.com/guid_2_trees_2.babylon: Failed to load scene.". The url of the file is correct because the file opens on the browser. There is something that escapes me, can you help me catch up? thank you http://playground.babylonjs.com/#DKF6U5#6 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 2, 2018 Share Posted January 2, 2018 If you click 'New' in playground, you will see that there must be a createScene() which returns a value. Using Append is much easier in the PG. I never got anything to return, before I gave up, but here is a PG which tries anyway. Quote Link to comment Share on other sites More sharing options...
kurhlaa Posted January 2, 2018 Share Posted January 2, 2018 Check this about "Access-Control-Allow-Origin" error: RaananW 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 3, 2018 Share Posted January 3, 2018 CORS it is. @kurhlaa is completely right. You will need to either host the file on a server that supports cross-origin calls, or configure your current server to allow this Quote Link to comment Share on other sites More sharing options...
mecanicus Posted January 3, 2018 Author Share Posted January 3, 2018 Thank you for your answers. I modified the httpd.conf file of my apache server according to the following procedure: Open the httpd.conf file with a text editor (eg Brackets) and look for the line below. LoadModule headers_module modules / mod_headers.so This line is used to activate the Apache module for customizing HTTP request headers. It must not begin with a # character (which places the rest of the line in comment). If this is the case, delete the # character. Then, add the following lines to the end of the file. <IfModule mod_headers.c> # Accept cross-domain requests Header always set Access-Control-Allow-Origin "*" </ IfModule> Save your changes, then stop and restart Apache. >> I no longer have the error concerning the cross domain but I have the following error on the console: the GET request added ".manisfest?xxxxx" to the url, is this normal ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 3, 2018 Share Posted January 3, 2018 Yes it is and you can turn this warning off with: BABYLON.Database.IDBStorageEnabled = false Quote Link to comment Share on other sites More sharing options...
mecanicus Posted January 3, 2018 Author Share Posted January 3, 2018 Thank's, I have no more errors, but at the PG console I do not see a loaded mesh. Is it linked to the error message of the camera ? http://playground.babylonjs.com/#DKF6U5#12 http://playground.babylonjs.com/#DKF6U5#12 Quote Link to comment Share on other sites More sharing options...
MarianG Posted January 3, 2018 Share Posted January 3, 2018 Hi. You need two more things. An executeWhenReady function to check when your scene is ready. And a renderer loop to render your scene.http://playground.babylonjs.com/#DKF6U5#13 Quote Link to comment Share on other sites More sharing options...
mecanicus Posted January 3, 2018 Author Share Posted January 3, 2018 Great thank's, 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.