Optimizing Using Cached Resources, Possible issues?

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.


Thanks in advance!

I believe the max size is 128MB but I can be wrong. Do you have any error in the console?

Hi Deltakosh,
there’s no any errors in the console, I return back to the version 3.3 and everything works, but the version 4.2.0 does not work.

And what about 5.0?

The same issues, the next pics belongs to the fourth load.

can you repro on the PG so I can see what is going on?

Hi DeltaKosh,
I just tried on the PG and works!!!
Create a Simple World Series | Babylon.js Playground (babylonjs.com)

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`);