Jump to content

Manifest file improvement


Vousk-prod.
 Share

Recommended Posts

Hello everyone!

I'd like to discuss a little bit about the manifest that goes with the .babylon files.

For now, it contains an "arbitrary" version number (integer), and the loader checks if this number is greater than previous one to determine if 3D data an textures should be loaded from indexedDB or network.

Wouldn't it be more usefull if this version number could be a string instead of integer (with simple comparison between new string and previous one)? So we could, for instance, put the hash of the .babylon associated, allowing a more standard way to check if file need to be taken from cache or not.

If people can put the string they want, any kind of uid could be used to version the 3D and/or the textures associated. That would be really usefull.

Oh, and now I'm talking about manifest, I'm not totally sure for that but I think I've noticed several times that if we once have the .babylon cached in indexedDB and then set "enableSceneOffline" : false the .babylon file is still taken from cache on not loaded from server. Could it possibly be a bug?

Link to comment
Share on other sites

Hello,

I need to do some testing as it used to work for the bool enableSceneOffline. Can you check using F12 that the .manifest file downloaded by the browser really has the bool set to false? It could be a cache issue. 

For your idea, I'm not sure to have understood the hash approach. Currently I'm using indeed an integer and if the version is different, I'm download the complete scene file (.babylon) & texture associated (based on the 2 boolean values).

For your hash idea, the hash would be on the complete file itself or on the URL?

David

Link to comment
Share on other sites

@davrous Forget the hash part. User will fill the value with anything he wants (hash or other data, no matter). 

The idea is just to allow the version value to be a string instead of an integer. So users will be able to manage those manifest with better efficiency (for instance by using some hash of 3D and textures files, or anything else, even in an automated way in continuous integration context or whatever).

Just check the string value, if new one is different from previous one, simply continue with your previous behavior (download .babylon & texture associated based on the 2 boolean values).

 

Link to comment
Share on other sites

If i can add something, sometimes the actual manifest file isn't enough to force reload.

I have to be in private mode or add a string to all loaded meshes like this :

var version = '?0.3.1.0';
assetsManager.addMeshTask("MyMesh", "", "path/", "mymesh.babylon" + version);

To force a new url to load

Link to comment
Share on other sites

Oh and this explains why sometimes the .babylon is still the old one even when enableSceneOffline is set to false aftewards.

And you see, with string as version, if the cache process is correctly managed by BJS, a CI machine will be able to automaticaly set the manifest (with the hash of the .babylon file for instance) and no need then to bother manually with the manifest file! That would be awesome.

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