Kingmarc77 Posted October 10, 2015 Share Posted October 10, 2015 Here is my simple code:<html> <head></head> <body> <canvas id="renderCanvas"></canvas> <script src="jquery-2.1.4.min.js"></script> <script src="babylon.2.2.max.js"></script> <script> var canvas = $("#renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); var camera = new BABYLON.ArcRotateCamera("Camera", 1, 2, 10, new BABYLON.Vector3(0, 0, 0), scene); scene.activeCamera.attachControl(camera); engine.runRenderLoop(function () { scene.render(); }); </script> </body></html>When I open that with jQuery and BabylonJS in the same directory, I get this error in Firebug: Error: WebGL not supported It works in neither Firefox nor Chrome. WebGL does otherwise work. I can, for example, run https://videos.cdn.mozilla.net/uploads/mozhacks/flight-of-the-navigator/ and the Three.js examples. I get this same problem on both my Windows and my Mac. Anyone have any idea what's wrong? Here is my Firefox-configuration on Windows: Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 11, 2015 Share Posted October 11, 2015 Is the playground works if you go to http://www.babylonjs-playground.com ? Quote Link to comment Share on other sites More sharing options...
Kingmarc77 Posted October 11, 2015 Author Share Posted October 11, 2015 Is the playground works if you go to http://www.babylonjs-playground.com ? Yes, playground works. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 11, 2015 Share Posted October 11, 2015 Ok so babylon.js works with your computer. Can you check the line number and file where this error happens? Quote Link to comment Share on other sites More sharing options...
Temechon Posted October 11, 2015 Share Posted October 11, 2015 It's because your canvas is a JQuery element, instead of being a DOM element.Replace this line by : var canvas = document.getElementById("renderCanvas");or : var canvas = $("#renderCanvas").get(0); // returns the DOM element linked to the jquery element Quote Link to comment Share on other sites More sharing options...
Kingmarc77 Posted October 11, 2015 Author Share Posted October 11, 2015 It's because your canvas is a JQuery element, instead of being a DOM element.Replace this line by : var canvas = document.getElementById("renderCanvas");or : var canvas = $("#renderCanvas").get(0); // returns the DOM element linked to the jquery element Thank you! Also, the scene.activeCamera.attachControl(camera); line wanted changing to camera.attachControl(canvas);. Now I can finally start working with BabylonJS! Thank you all! Quote Link to comment Share on other sites More sharing options...
vegasgroup Posted April 5, 2016 Share Posted April 5, 2016 Help me I have a similar problem, locally working on firefox but not working in chrome. On the server does not load in any browser but only on sandbox. If you can help me thanks so much Quote Link to comment Share on other sites More sharing options...
jerome Posted April 5, 2016 Share Posted April 5, 2016 take a look at your network tab in FF dev tools : tourrr.babylon?once=etc resources aren't loaded ... http error 404 : not found ! Quote Link to comment Share on other sites More sharing options...
vegasgroup Posted April 5, 2016 Share Posted April 5, 2016 I'm sorry but I did not understand, are new in Babylon The tourrr.babylon file is in the folder sorry but I did not understand... how do I fix? Quote Link to comment Share on other sites More sharing options...
Temechon Posted April 5, 2016 Share Posted April 5, 2016 Remove this from your code: ?once=974266480 Quote Link to comment Share on other sites More sharing options...
vegasgroup Posted April 5, 2016 Share Posted April 5, 2016 is same only works with firefox locally, in chrome and explorer continues to load ...the server continues to load, but just does not go Quote Link to comment Share on other sites More sharing options...
Temechon Posted April 5, 2016 Share Posted April 5, 2016 Are you sure tourrr.babylon is on the server ? I have a 404 error from here. Quote Link to comment Share on other sites More sharing options...
vegasgroup Posted April 5, 2016 Share Posted April 5, 2016 Also I see error, but the file is on the server, but then why locally with firefox it all works? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted April 5, 2016 Share Posted April 5, 2016 As you are using IIS, you need to allow .babylon file to be serve as static file in your server. Quote Link to comment Share on other sites More sharing options...
vegasgroup Posted April 6, 2016 Share Posted April 6, 2016 Sorry but I would like to solve the problem, I also changed the server, but is similar to the problem !!! help please file tourrr.babylon is ok help me please... Quote Link to comment Share on other sites More sharing options...
jerome Posted April 6, 2016 Share Posted April 6, 2016 you tourrr.babylon files aren't served by your web server (http error 404) This is a web server configuration error, not a BJS one. What webserver are you using ? it seems it's a nginx server after some hacking, so not Windows OS Are you sure that your tourrr.babylon files have the correct rights to be read by the nginx server ? Quote Link to comment Share on other sites More sharing options...
vegasgroup Posted April 8, 2016 Share Posted April 8, 2016 the server is linux on Arvixe, I have included MIME babylon ... you can help me I do not understand where I'm wrong I'm sorry help me thanks Quote Link to comment Share on other sites More sharing options...
Kesshi Posted April 8, 2016 Share Posted April 8, 2016 1 hour ago, vegasgroup said: the server is linux on Arvixe, I have included MIME babylon ... you can help me I do not understand where I'm wrong I'm sorry help me thanks Doesn't look like linux to me. Your loading the babylon file from: http://www.arteinart.com/bonci3d/tourrr.babylon If you open this link in the browser you get an IIS error page -> its a windows server running IIS 8.5 Quote Link to comment Share on other sites More sharing options...
adam Posted April 8, 2016 Share Posted April 8, 2016 You need to update the url to your babylon file. It should be http://svendo.net/bonci3d/tourrr.babylon Quote Link to comment Share on other sites More sharing options...
vegasgroup Posted April 8, 2016 Share Posted April 8, 2016 ok thanks to all I solved server problemThanks again 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.