Need to preserve viewer's 'state' between navigation


(Amyhannaman) #1

Greetings,

I'm currently using the sketchfab viewer to display a model, which is modified via configuration options. We are able to capture a screenshot, and pass along to another state within our angular application. However, when we navigate back to the state which holds the viewer, it is being reinitialized. What's the best way to keep track of our viewer's changes, i.e. the nodes we have set to visible, which are hidden, colors applied to various materials, and the latest camera view? We'd like to be able to return to the 'page' with the viewer and keep the modifications from before we left.

We'd prefer not to have to parse through all the individual viewer modifications, applying each of them again, but that is what we had to do for now. Is there a better way to do this via the API?


#2

Hello,

If you stop() and start() the viewer with the API, it should be exactly how you left it. However, if you've navigated away from the page or re-initialized the iframe, there's currently not a good way to store the state without parsing all the modifications, sorry :confused: