Aerion Posted November 7, 2014 Share Posted November 7, 2014 Hello all. I'm new here and may have found a bug in the Babylon.js / hand.minified-1.1.0.js frameworks. This bug only happens in safari, and in order for my 3D scene to display on Mac screens correctly, I need help to fix these few problems. If you go to this link, this is the demo I am trying to get to run in Safari. If you click this link and open up the javascript debug console, you'll see what I mean when it returns a few errors within these 2 frameworks. http://www.babylonjs.com/tutorials/blogs/customShaders/customShaders.html If you try it in any other browser that supports WebGL, it will work fine. At least in the main browsers. Firefox, even IE is working. (IE9+). Google Chrome. Even Opera works. Thank you for your help, and have a GREAT day! =) Sincerely, Mythros Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 7, 2014 Share Posted November 7, 2014 I do not have a mac. can you share errors returned on the console? Quote Link to comment Share on other sites More sharing options...
gryff Posted November 7, 2014 Share Posted November 7, 2014 Mythros Welcome to the babylon.js forum. A simple question - is WebGl enabled in current version of Safari? Enabling WebGL in Safari cheers, gryff Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 7, 2014 Share Posted November 7, 2014 Not on my Mac, Safari. Version 6.16. I have 3 versions of OSX on my system, but I prefer LION, even though it is old. Quote Link to comment Share on other sites More sharing options...
macguyvok Posted November 7, 2014 Share Posted November 7, 2014 Not on my Mac, Safari. Version 6.16. I have 3 versions of OSX on my system, but I prefer LION, even though it is old. WebGL is only enabled by default on OS X 10.10 (the latest). You will not be able to get this to work on Safari "out of the box" on older versions. As gryff linked, there's instructions to enabling it on safari in older versions, but every user would need to do that. Alternatively, Firefox and Chrome have WebGL support on all supported versions of OS X. Keep in mind, this isn't a Babylon.js limitation, this is a Safari limitation. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 7, 2014 Share Posted November 7, 2014 Tower of Babel, if asked to create html does the example below. If already enabled will never show, but if distributing, keep in mind the customer is not going to switch browsers for you. Having a decent message of what to do is imperative.<script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); console.log("Babylon version: " + BABYLON.Engine.Version); if (typeof(MORPH) !== "undefined") console.log("Morph version: " + MORPH.Mesh.Version); var scene = new BABYLON.Scene(engine); materialsRootDir = "./TOB-out"; // edit when texture files in a different dir than html mesh_parent.initScene(scene, materialsRootDir); scene.activeCamera.attachControl(canvas); engine.runRenderLoop(function () { animate(scene); scene.render(); }); }else{ alert("WebGL not supported in this browser.\n\n" + "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences. " + "On the 'Develop' menu, check the 'Enable WebGL' menu item."); } //Resize window.addEventListener("resize", function () { engine.resize(); }); </script> 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.