I have a single-page frontend.
The viewport is re-initializing on every view of the product.
Resulting in model overlaps inside canvas.
Not able to find api to destroy before initialize.
AND not able to find it in the documentation as well! (Viewers)
My code:
window.viewer = await SDV.createViewport({
canvas: document.getElementById('sdv-container'),
});
window.session = await SDV.createSession({
ticket: shape_diver_ticket,
modelViewUrl: model_url
});
Screenshot contains 3 models in a single canvas.
Need help with this please.