Browse Source

added a delete function to the canvases map when disposing of HTMLMesh (#24779)

Co-authored-by: Jonathan Davidson <[email protected]>
Jonathan Davidson 2 years ago
parent
commit
3a02d2faf7
1 changed files with 2 additions and 0 deletions
  1. 2 0
      examples/jsm/interactive/HTMLMesh.js

+ 2 - 0
examples/jsm/interactive/HTMLMesh.js

@@ -36,6 +36,8 @@ class HTMLMesh extends Mesh {
 			material.dispose();
 			material.dispose();
 
 
 			material.map.dispose();
 			material.map.dispose();
+			
+			canvases.delete( dom );
 
 
 			this.removeEventListener( 'mousedown', onEvent );
 			this.removeEventListener( 'mousedown', onEvent );
 			this.removeEventListener( 'mousemove', onEvent );
 			this.removeEventListener( 'mousemove', onEvent );