NotADesigner Posted June 14, 2016 Share Posted June 14, 2016 I have a hybrid android application that uses babylonjs and what gets passed in the array for the skybox images are paths that use the android file system (file:///android_asset/www) and it doesn't seem like babylon is liking that. Is there a work around for this other than base64-ing all the images and putting that inside the JS? Example would be http://www.babylonjs-playground.com/#AVG8L#1 but with file:/// ( file:///C:/textures/TropicalSunnyDay_px.jpg for example) Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 15, 2016 Share Posted June 15, 2016 @NotADesigner - This is a limitation of WebGL, and a conversion is not possible without the use of an encoder/decoder. I don't want to make any recommendations, as I don't have personal experience using a base64 encoder/decoder in WebGL development. However I'm certain there are users on this forum who do - no names necessary... you know who you are. DB Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 15, 2016 Share Posted June 15, 2016 Hey! I do not have an Android so I will not be of any help this time Quote Link to comment Share on other sites More sharing options...
NotADesigner Posted June 15, 2016 Author Share Posted June 15, 2016 For this case, android doesn't matter. The effect is the same if you were to use a local path if you were to open up an index.html from ur local drive. The image path would just be like file:///C:/textures/TropicalSunnyDay_px.jpg . For android, the concept is the same but just a different path. Not sure if i'm explaining correctly. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 15, 2016 Share Posted June 15, 2016 Ok in this case it is more a security reason. Browsers cannot open local resources (unless you check some options to disable security) Quote Link to comment Share on other sites More sharing options...
NotADesigner Posted June 15, 2016 Author Share Posted June 15, 2016 was hoping you didn't say that. Base64 it is then.. lol. thanks for the help. 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.