hannorein / rebound

💫 An open-source multi-purpose N-body code.
https://rebound.readthedocs.io/
GNU General Public License v3.0
824 stars 218 forks source link

Initialize webgl properly for newly loaded simulations #642

Closed alchzh closed 1 year ago

alchzh commented 1 year ago

When using takeScreenshot to create a movie in Jupyter, the archive loading crashes the kernel. Probably caused by the new behavior of SimulationArchive.getSimulation allocating a new simulation object from scratch on call. This PR fixes it by calling reb_display_init_data on each load.

hannorein commented 1 year ago

Thanks for catching and fixing that!