Jelajahi Sumber

Editor: Proper App.dispose()

Mr.doob 9 tahun lalu
induk
melakukan
e07f90ba85
1 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 6 1
      editor/js/libs/app.js

+ 6 - 1
editor/js/libs/app.js

@@ -247,7 +247,12 @@ var APP = {
 
 		this.dispose = function () {
 
-			this.dom.removeChild( renderer.domElement );
+			while ( this.dom.children.length ) {
+
+				this.dom.removeChild( this.dom.firstChild );
+
+			}
+
 			renderer.dispose();
 
 		};