Using Meshopt compress within Three.js code

Hi all. I’m having troubles with the loading speed of my GLB’s within my app. My scene freezes for a second on coordinates (0,0) and then moves the camera to where my GLB’s are. I thought this might be because my GLB are taking way too long to load, since that ‘camera jump’ only happens when a new GLB is loaded.

I’ve been using the MeshoptDecoder to load some compressed GLB with gltfreport and I’m seeing good results, apparently the models load way faster and the camera jumps are not noticeable.

My problem arises from the amount of GLB that my app will hold in the future (counting thousands of them). Having to compress all GLB one by one does not seem very viable to me. As of now, I have not seen a way to dinamically compress the GLB within Three.js code or any sort of library.

Any help would be greatly appreciated.