Time series in vtkjs

Indeed you cannot use vtkSMAnimationSceneWebWriter if you want to only depend on VTK.

This is vtkSMAnimationSceneWebWriter algorithm :

  • create a place-holder index.json at the root of a folder with all necessary keys,
  • for each timestep:
    • use the vtkJSONSceneExporter class to export each frame in its own folder, at the same level of index.json
    • add the current timestep time to the root index.json (see index.json below)
  • at this point we have a folder, let’s say /home/user/somewhere/, containing :
    • index.json
    • scene_timestep1/
    • scene_timestep2/
    • […]
  • call zipAllTimeSteps('/home/user/somewhere/myFinalExport.vtkjs'). After that /home/user/somewhere/ will only contain myFinalExport.vtkjs.

If you wish to reimplement this algorithm you can pretty much copy paste the zipAllTimeSteps function (keep in mind the license though :slight_smile: ) and reimplement vtkSMAnimationSceneWebWriter algorithm.