Jump to content

get data from Texture


Tim_Rosskamp
 Share

Recommended Posts

Hey,

i'm trying to get the data source from a loaded Texture in BABYLON. But I haven't found a way to do this.

Basicly my idea is to get the data from the image and save it as base64 in the local cache. And then I can get the image from the cache again and load it into BABYLON. This should improve performance and result in faster loading times once you already loaded the scene once.

Does this accually makes sense or is there a better way of caching textures?

Link to comment
Share on other sites

Well, yes, there is a better way. Just trust Babylon :)

Babylon does that for you. We cache textures, so if the same URL is being used, the texture will not load again.

You can also use the offline support to keep the textures locally and not download them from the server after a single download. You can read about it here - http://doc.babylonjs.com/tutorials/caching_resources_in_indexeddb . But this is extra to caching on each page load.

Link to comment
Share on other sites

I dont really get how this is working.

It seem like babylon doesnt cache my textures by default, so i have to enable it.

The Documentation says I need to create a NameOfYourScene.babylon.manifest file. But I dont have a Scene Name... And the file needs to be in my document root?

This seems to be a bit odd to me. Or do I just dont get the concept of this? :D

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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