Tim_Rosskamp Posted September 24, 2017 Share Posted September 24, 2017 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? Quote Link to comment Share on other sites More sharing options...
RaananW Posted September 24, 2017 Share Posted September 24, 2017 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. Quote Link to comment Share on other sites More sharing options...
Tim_Rosskamp Posted September 25, 2017 Author Share Posted September 25, 2017 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? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 25, 2017 Share Posted September 25, 2017 The cache is by default in memory If you want Babylon.js to cache the files in IndexedDB then you have to use the manifest 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.