Parcourir la source

Editor: Proper App.dispose()

Mr.doob il y a 9 ans
Parent
commit
e07f90ba85
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  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();
 
 		};