Save glb export result in a File rather than download

Hi, I have a question about saving the scene (not download the scene).

Currently, I’m using

GLTF2Export.GLBAsync(viewer.sceneManager.scene, "scene").then(
                (glb) => {

I want to save the (glb) results into the file (not download it.)
Like , I tried
var file = new File([glb], "filename.glb");
But , It’s giving me 15Bytes file size. You can say it’s not proper file that I’m looking for. Because , when I used glb.downloads() , It’s giving me 9.4MB file size.

Please help me in this regard.

glb is an object that can contain multiple files, they’re located in glb.glTFFiles

1 Like

I found a best solution for it
var file = new File([glb.glTFFiles["scene.glb"]], "export.glb");
Worked… heheheh


Thanks , I consoled it and found :smiley: