J-Andersen-UvA / BabylonSignLab

1 stars 1 forks source link

Make mesh loading cached #1

Closed J-Andersen-UvA closed 2 months ago

J-Andersen-UvA commented 2 months ago

We don't want to reload the mesh for every animation, that would be slow. Therefore, we want to cache the mesh. Cache the mesh rhymes.

rem0g commented 2 months ago

I think Babylon caches itself automatically based on my experiences with onprogress of await BABYLON.SceneLoader.ImportMeshAsync. You have similair function written, right?

rem0g commented 2 months ago

engine.disableManifestCheck = true in Scene loader disables check if file has manifest and then caches it, so we dont need seperate manifest for every file.

    BABYLON.Database.IDBStorageEnabled = true; in main.html enables caching. 

Loading speed is improved by 99%