Pictofit / Web SDK / 7.3.1 / Auto-Switching


The WebViewer supports auto-swichting between different configurations. To enable this, simple pass an array of configurations instead of a single one to loadConfigFromURL(...). The following example shows how this is done

// ...
let viewer = new Pictofit.WebViewer("canvas3d");
viewer.autoSwitchInterval = 5;
viewer.loadConfigFormUrl(["first.json", "second.json"]);
// ...

This will now load the first configuration in the array and switch to the second one after a five second interval. You can configure this interval and other paramters as well. Finally, you can also turn of the auto-switching and manually toggle loading of the next oder previous configuration in the array.

// ...
viewer.autoSwitchingActive = false;
viewer.loadConfigForUrl(["first.json", "second.json"]);
// eg. on button press
// ...
© 2014-2020 Reactive Reality AG