Is it possible to have an incremental save when exporting using GLTFExporter

I have a scenario in which GLTFExport is going to be called regularly, I want to know if there is something like incremental save possible with GLTFExport?

Things I am doing:

  • Create a scene
  • Add assets into the scene
  • Save the scene
  • Import the scene
  • Add more assets into the scene
  • Save the scene

Now, the issue is that on ever save call, the whole scene gets saved which has a lot of things which are redundant. And, since we are going to upload the saved scene using an API, this solution doesn’t seem like it will scale up.

So, is it possible to have incremental save with GLTFExport in any way possible? Something like -

The exporters are only able to export a whole scene. This is also true for the autosave feature of the editor. So on every save the entire scene is stored. This is of course less efficient than just storing the delta actions between the last and current save (see https://github.com/mrdoob/three.js/issues/15853#issuecomment-468144366).

Well, possible yes. But I think this idea goes in the wrong direction. GLTFExporter should only focus on exporting a scene/object to glTF. An (incremental) autosave feature should be implemented into an editor using a custom (probably binary) format. I would not use glTF for this.

GLTFExporter doesn’t and can’t support this.

I would have a look at the three.js Editor, and the command pattern. Each node has a .toJSON() method as well, which could be helpful for incremental saves.