Can i load model from zip file?

Hello. I have a backend (express js) that sends a model file to my website. But I have a problem when I try to load .gltf models. The model itself loads correctly, but when the site links to the “.bin” and textures file, it tries to execute a get request via a link that is difficult for me to process (for example https/ip.port/models/scene.bin).
Can I download the model from a zip archive that contains all the necessary files?

Yup.

1 Like

Note that using a zip would also require some overriding of relative URLs in the .gltf referencing other files:

If you have the option of writing the necessary files to a .glb instead of a .zip, that will load faster on the frontend:

npm install --global @gltf-transform/cli

gltf-transform cp input.gltf output.glb
2 Likes