three-cad-viewer 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56207,19 +56207,27 @@ class Viewer {
|
|
|
56207
56207
|
dispose() {
|
|
56208
56208
|
this.clear();
|
|
56209
56209
|
|
|
56210
|
-
|
|
56210
|
+
// dispose the orientation marker
|
|
56211
|
+
if (this.orientationMarker != null) {
|
|
56212
|
+
this.orientationMarker.dispose();
|
|
56213
|
+
}
|
|
56211
56214
|
|
|
56212
56215
|
// dispose renderer
|
|
56213
|
-
this.renderer
|
|
56214
|
-
|
|
56215
|
-
.
|
|
56216
|
-
|
|
56217
|
-
|
|
56218
|
-
|
|
56216
|
+
if (this.renderer != null) {
|
|
56217
|
+
this.renderer.renderLists.dispose();
|
|
56218
|
+
this.renderer
|
|
56219
|
+
.getContext("webgl2")
|
|
56220
|
+
.getExtension("WEBGL_lose_context")
|
|
56221
|
+
.loseContext();
|
|
56222
|
+
console.debug("three-cad-viewer: WebGL context disposed");
|
|
56223
|
+
this.renderer = null;
|
|
56224
|
+
}
|
|
56219
56225
|
|
|
56220
56226
|
// dispose all event handlers and HTML content
|
|
56221
|
-
this.display
|
|
56222
|
-
|
|
56227
|
+
if (this.display != null) {
|
|
56228
|
+
this.display.dispose();
|
|
56229
|
+
this.display = null;
|
|
56230
|
+
}
|
|
56223
56231
|
}
|
|
56224
56232
|
|
|
56225
56233
|
/**
|