AndyBeaulieu Posted October 17, 2014 Share Posted October 17, 2014 This used to work for me in an old build of Babylon, but after upgrading to latest I can't get it to work. Basically I am just creating a texture from an image URL, dynamically. In the newer build, I don't get the texture (I just get a black material). Any ideas? var imageSrc = "http://www.someserver.com/someimage.jpg";var img = new Image();img.crossOrigin = 'anonymous';img.onload = function () { var textureTileImage = new BABYLON.Texture(imageSrc, that._scene); tile.material.diffuseTexture = textureTileImage;};img.src = imageSrc;Thanks! Quote Link to comment Share on other sites More sharing options...
AndyBeaulieu Posted October 17, 2014 Author Share Posted October 17, 2014 It turns out this is only happening in IE11 - Firefox and Chrome are displaying the textures just fine! I will start a separate thread for the issue. UPDATE: This issue was happening in Safari (iOS8) and IE11. It turns out that it was because I needed to add a call to ComputeNormals in the code I had to create terrain. I am not sure why it wasn't need in Chrome of Firefox, but I seem to be good to go now!BABYLON.VertexData.ComputeNormals(positions, indices, normals); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 17, 2014 Share Posted October 17, 2014 Huh! interesting thing...I have no clue why it worked on chrome Oo 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.