Jump to content

CubeTexture.CreateFromImages with file:///


Recommended Posts

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)

Link to comment
Share on other sites

@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.;)


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...