Hi guys,
The following lines used to work caching the models loaded
let canvas = document.getElementById(id);
let engine = new BABYLON.Engine(canvas, { preserveDrawingBuffer: true, stencil: true });
BABYLON.Database.IDBStorageEnabled = true;
engine.enableOfflineSupport = true;
Using the new stable version, it does not work, there’s any additional implementation that I’m missing? Does it exist a new restrictions from browers about the file sizes? I put the commented lines at the beginning of the function. The .glb file is under 90mb.
I’m using the babylon.js and babylonjs.loaders.js libraries, should I include any extra library using the new versions?, using the version 3.3 with these two libraries works without any problem.
Thanks for your help!
I just gave up! I was thinking there were some issues, because I was using a fetch function to get the valuea, valueb and valuec => loader.addMeshTask(‘valuea`’, ‘’, ‘myurl’, ‘valueb’), if you aske me why? it is because sometimes there are several assets that integrate a model and I use the additional valuec that is a number to help me to iterate in the following steps:
let loader = new BABYLON.AssetsManager(scene);
let counter = 1;
while (counter <= valuec) {
loader.addMeshTask('valuea', '', 'myurl', ${valueb}_${counter}.glb`);
counter++;
}
loader.load();
I have all exactly as ladrian in his first message, so manifest for each GLB with correct values in it, and enable all of BabylonJS offline system, but still not work and no error in the console.
BabylonJS 4.2.0
If I understand his last answer, he just uses AssetsManager and addMeshTask instead of importMesh (due to not offline cache compatible anymore in 4.2.0) ?