I have created a web application where 8 different gltf-models can be loaded by selection. Now I want to create a PWA with offline functionality from it. Each gltf-scene has
- a corresponding manifest file
Database.IDBStorageEnabled = true
so each scene is successfully stored in the IndexedDB, when loading the file manually in my application!
Questions:
- Is there a way to use BabylonJS to preload scenes into the IndexedDB in advance using a command? Something like ‚BABYLON.Database.pushFile(„./assets/myfile.gltf“)‘?
- Is the IndexedDB the rigth place to store files persistant?
- Should I better implement the whole thing myself, e.g. with a “ServiceWorker” or the Background Fetch API?
- Is there a documentation how scenes have to be stored in the IndexedDB so that they can be loaded from there by BabylonJS?
(In the past I’ve build several offline- / desktop-applications based on Bayblon and Electron / NW.js.)
Thanks for your advices / suggestions how to (roughly) achieve a PWA with full offline support!