Vousk-prod. Posted June 3, 2014 Share Posted June 3, 2014 Hello you, I'm using manifest files with my babylon scenes, but sometimes it doen't work correctly (or I misunderstand something).I have a babylon scene file, version 1.I put in manifest file (correctly nameed myscene.babylon.manifest) :{ "version" : 1, "enableSceneOffline" : true, "enableTexturesOffline" : true }Ok, my scene and textures are loaded and put in cache. I then can go offline to play with my scene. Then I change my babylon file, and I also change my manifest file to :{ "version" : 2, "enableSceneOffline" : true, "enableTexturesOffline" : true }But the browser (firefox) is still using the old babylon scene in cache instead of loading the new one.(I'm not using any other cache system in the website) If I remove the manifest file, the new scene is correctly loaded. But then if I put again the manifest (even while incrementing version number), it is always the old scene file in cache that is used and not the new one. (Of course if I clear cache, the new one is loaded and stored in cache, but I cannot ask internet users to empty their cache everytime is update my scene ). Any idea, suggestion, similar problem ? Quote Link to comment Share on other sites More sharing options...
davrous Posted June 3, 2014 Share Posted June 3, 2014 Hi, Will look into it. I've maybe got a bug in my updating logic. Thanks for pointing it out. Bye, David Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted June 6, 2014 Author Share Posted June 6, 2014 I think I didn't have trouble with this feature some babylon's versions ago, but I'm not totaly sure now... Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted June 12, 2014 Author Share Posted June 12, 2014 Any news about that ? I've just figured out another not really convenient behaviour with the cache system : the loading progress function (in BABYLON.SceneLoader.Load) is not called at all when the cached version is used. Even if objects and textures are in cache, for big scenes it takes time to compute and paint on screen, so to know the internet AND cache loading progress is equally usefull. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 12, 2014 Share Posted June 12, 2014 I have the same problem with manifest files that does not change anything. I should empty the browser caches and if I delete the manifest file I get errors in the console that the manifest file is missing. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 13, 2014 Share Posted June 13, 2014 What happens to this bug? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 2, 2014 Author Share Posted July 2, 2014 Sorry to "up", but a powerfull game engine as BJS, capable of loading and displaying efficiently large amount of 3d and textures data, with lots of marvelous functionnalities pushed in, but where we can't rely on a working caching system whereas it's targeted to be accessed on the internet... pretty difficult to use in production :'( Dad72 1 Quote Link to comment Share on other sites More sharing options...
davrous Posted July 3, 2014 Share Posted July 3, 2014 I'm going to test that today. But you know, we don't deliver any kind of professional support as it's a personal project. We're spending a lot of energy fixing bugs reported by the community on our spare time. Don't hesitate to debug yourself the code available as open source. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 3, 2014 Author Share Posted July 3, 2014 Yes I know that ! I love the work you all do and I do not ask for any professional support. In fact I'm totally impressed by the work you manage to do in this project on your spare time.My purpose is also to help community to be able to do great things with this engine.For some points I just do not understand what your code is about, your game engine is a big stuff, not a simple piece of code, and I'm very new to javascript and HTML5 (and also I've never written a single line of typescript...) but when I can I'm trying my best to contribute. Dad72 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted July 4, 2014 Share Posted July 4, 2014 Hey guys, I think I found the problem, but please tell me what your think.In the function _saveSceneIntoDBAsync, the system retrieve the scene by its URL with a XMLHttpRequest.However, this request looks first for the a resource with the same URL in the browser cache if existing (https://developer.mozilla.org/es/docs/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache). => I think the new version of your scene is not loaded because the old one is retrieved from the browser cache. In order to bypass the cache, a cross-browser compatible approach is to append a timestamp to the URL when calling the XMLHttpRequest, like this : url += (url.match(/\?/) == null ? "?" : "&") + (new Date()).getTime()A pull request has been created https://github.com/BabylonJS/Babylon.js/pull/224Meanwhile, Vousk-prod, can you tell me the version of babylon you're currently using ? I can build a custom version of babylon to check if this fix your problem. Cheers ! davrous and Dad72 2 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 4, 2014 Author Share Posted July 4, 2014 Very clever, what a responsive community ! Currently I'm using the 1.12.beta for all of my scenes (because it's a very good version and only 406 Ko), but I will use 1.13.beta (and following versions) for new projects (good to be up to date in this kind of dev). Quote Link to comment Share on other sites More sharing options...
Temechon Posted July 4, 2014 Share Posted July 4, 2014 Here is a temporary version of babylon1.12 with my fix.Just replace .txt by .js. Can you please check if this fix the problem ? Cheersbabylon.1.12_fix.txt Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 4, 2014 Share Posted July 4, 2014 This is excellent. Thanks for that Temechon. I'll wait until the pull request is commited in 1.13. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 4, 2014 Author Share Posted July 4, 2014 Thanks Temechon, I'll try your fix this w-e ! Quote Link to comment Share on other sites More sharing options...
davrous Posted July 4, 2014 Share Posted July 4, 2014 Excellent fix. Thank you for debugging my code! I haven't thought about the browser cache problem. David Quote Link to comment Share on other sites More sharing options...
Temechon Posted July 4, 2014 Share Posted July 4, 2014 My pleasure ! But I have to admit all this callback functions were not easy to understand Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 6, 2014 Author Share Posted July 6, 2014 I did some tests and it seems to work perfectly now. Big thanks ! Quote Link to comment Share on other sites More sharing options...
Temechon Posted July 6, 2014 Share Posted July 6, 2014 Cool ! Quote Link to comment Share on other sites More sharing options...
davrous Posted July 19, 2014 Share Posted July 19, 2014 Hi, I've finished completely rewriting babylon.database.js in TypeScript yesterday (which means that babylon.js is now 100% written in TypeScript! ). I've added a couple of fix & enhancement. It contains the timestamp trick of Temechon & some bugs fix for Chrome that now support blob storage in IDB. This new version is a bit more robust than the previous one and you shouldn't have anymore the cache manifest problem. I now need to work on .DDS & .TGA support in the DB. Bye! David Quote Link to comment Share on other sites More sharing options...
Temechon Posted July 19, 2014 Share Posted July 19, 2014 Gg David, and thanks for your work Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 19, 2014 Author Share Posted July 19, 2014 Thanks. That's great news ! 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.