Closed suyang-nju closed 5 years ago
I can get the camera state by subscribing to Event.Visual.CameraChanged event. How do I serialize the camera state and restore it to the scene later? Basically, I'd like to persist the scene across user sessions.
Event.Visual.CameraChanged
This should be possible by using plugin.context.scene.scene.camera.snapshot/restore functions (https://github.com/dsehnal/LiteMol/blob/master/src/lib/Visualization/Base/Camera.ts#L237).
plugin.context.scene.scene.camera.snapshot/restore
Thank you!
I can get the camera state by subscribing to
Event.Visual.CameraChanged
event. How do I serialize the camera state and restore it to the scene later? Basically, I'd like to persist the scene across user sessions.