Ryu Posted March 19, 2016 Share Posted March 19, 2016 Hi Everyone, I am a newbie developer in babylonJs. I am learning it on my own. I am trying to load a babylon scene in an html page, but I don't seem to get it right. Please see "Babylon-no-load-issue.png" for reference. The scene files works perfect in babylon sandbox. I don't know what I am doing wrong. Can someone point out what I am doing wrong and how to correct it? Please see the attachment for the demo files that I am working with. Thanks in advance. Babylon Demo.rar Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 20, 2016 Share Posted March 20, 2016 Hello and welcome Ryu a common cause for this issue is the server you use to host your page. You cannot just click on it from your hard drive because browsers have security restrictions for content coming from local host So first question: are you hosting your page on a webserver? (even local like apache or IIS) NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted March 20, 2016 Share Posted March 20, 2016 @Deltakosh say right answer just test that with firefox you can see it Quote Link to comment Share on other sites More sharing options...
Ryu Posted March 20, 2016 Author Share Posted March 20, 2016 @NasimiAsl I tested it on firefox taking your advice, it seems to work fine on firefox. Thanks a lot !!! I would like to know why it's not working on other browsers and how to correct it. @Deltakosh I have the demo files located on my desktop folder. I have wamp installed on my laptop, it has apache 2.4.17. Is it enough? Can you give me step by step instructions on how to make the demo work on apache server? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted March 20, 2016 Share Posted March 20, 2016 just need run it in localhost with all version research about how can you upload a simple html file in apache do it for all your files Quote Link to comment Share on other sites More sharing options...
Ryu Posted March 20, 2016 Author Share Posted March 20, 2016 @Deltakosh @NasimiAsl I put the babylon demo folder inside www folder of the wamp, and renamed the babylon.html to index.php. I tried to open the URL "http://localhost/babylon%20demo/" and it works on chrome, firefox and opera. It does not work on IE. Is this what I was supposed to do in the first place? Are their any other alternatives? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Pranav Sathy Posted March 20, 2016 Share Posted March 20, 2016 The simplest method (assuming you have python installed) is the following (this is for Windows operating system), open up the command line (PowerShell), navigate to the directory with your files and type: #Python 3.x python -m http.server 8000 #Python 2.x python -m SimpleHTTPServer 8000 Then navigate to http://localhost:8000 to see your site. This requires only python installed, no Apache/Nginx. It has its limitations but I guarantee you will not run into them for small projects. 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.