Sfoglia il codice sorgente

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

Co-authored-by: Jonathan Davidson <[email protected]>
Jonathan Davidson 2 anni fa
parent
commit
3a02d2faf7
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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.map.dispose();
+			
+			canvases.delete( dom );
 
 			this.removeEventListener( 'mousedown', onEvent );
 			this.removeEventListener( 'mousemove', onEvent );