Knowing when operations are complete in the Forge viewer

We have a feature in Dasher called “kiosk mode”. It basically takes control of the browser to run a sequence of operations that show people how Dasher works. I published a series of posts a couple of years ago that explain a bit about how we implemented it.

One of the issues in kiosk mode is knowing when Forge viewer operations – such as view transitions or state restorations – are complete. Until recently the code just checked the viewer’s progressbar property, to see whether its value was close to 100 or not. This wasn’t ever a very good approach, because the progress bar is used multiple times when re-rendering a view of a model, especially when applying ground shadows or reflections. But it worked well enough because we could start the next operation in our sequence of features to show off even if the rendering was underway. Lately, though, I’ve found it isn’t working well, probably because the relative time it takes to perform certain operations has changed….

Read more