New dispose JavaScript SDK function


New dispose JavaScript SDK function

Apviz JavaScript SDK allows you to integrate a 3D configurator on your website with fine grain control.

Today we are announcing the new dispose JavaScript SDK function.

One important aspect in order to improve performance and avoid memory leaks in your application is the disposal of unused 3D viewer.

Whenever you create an instance of a 3D viewer, you allocate a certain amount of GPU memory that is necessary for rendering. It's important to highlight that GPU memory is not released automatically. Instead, your application has to use Viewer.dispose() in order to free such resources.

await viewer.dispose();

This is specially useful if you integrate your 3D configurator within a Single-page application (e.g. Facebook React, Vue.js, Google AngularJS) or if you show/hide 3D multiple times within the same HTML page.

If you use a Multiple-page application (MPA) and the 3D viewer is only showed once, you can skip disposal.

Note that Viewer.dispose() will also unbind the 3D viewer from your <div> making it possibly available for another 3D viewer.

This new feature is available starting now and is documented in the release integration page as usual.

Make sure to stay tuned to the changelog newsletter, we have great features and improvements coming soon: