openPMD / openPMD-viewer

:snake: Python visualization tools for openPMD files
https://openpmd-viewer.readthedocs.io/
Other
65 stars 50 forks source link

feature: VCR controls #408

Open BenWibking opened 9 months ago

BenWibking commented 9 months ago

Would it be possible to add playback controls to automatically advance/reverse the iterations in a series similar to VCR controls?

In Paraview or VisIt, there is functionality like this: https://visit-sphinx-github-user-manual.readthedocs.io/en/develop/using_visit/WorkingWithFiles/Time_Pane.html

BenWibking commented 9 months ago

The current slider widget is: https://github.com/openPMD/openPMD-viewer/blob/30b8e167abb6b37efcbcae16239a3c758d4e0bd6/openpmd_viewer/openpmd_timeseries/interactive.py#L304

I think this could be done by replacing this with the "Play (Animation)" widget: https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20List.html#play-animation-widget

Additional desired controls would be first frame/last frame/previous frame/next frame buttons (similar to: https://github.com/jupyter-widgets/ipywidgets/issues/717). This could also be implemented using the existing previous/next iteration buttons.

RemiLehe commented 9 months ago

Interesting idea! Do you think that you could implement this on a branch of openPMD-viewer, so that we can experiment with it, and see what the user experience feels like?

BenWibking commented 9 months ago

Sure, happy to give it a try!