Browse Source

Editor: Render only once when adding a scene.

Mr.doob 12 years ago
parent
commit
d5199c5192
1 changed files with 7 additions and 0 deletions
  1. 7 0
      editor/js/Editor.js

+ 7 - 0
editor/js/Editor.js

@@ -58,12 +58,19 @@ Editor.prototype = {
 		this.scene.name = scene.name;
 		this.scene.name = scene.name;
 		this.scene.userData = JSON.parse( JSON.stringify( scene.userData ) );
 		this.scene.userData = JSON.parse( JSON.stringify( scene.userData ) );
 
 
+		// avoid render per object
+
+		this.signals.sceneGraphChanged.active = false;
+
 		while ( scene.children.length > 0 ) {
 		while ( scene.children.length > 0 ) {
 
 
 			this.addObject( scene.children[ 0 ] );
 			this.addObject( scene.children[ 0 ] );
 
 
 		}
 		}
 
 
+		this.signals.sceneGraphChanged.active = true;
+		this.signals.sceneGraphChanged.dispatch();
+
 	},
 	},
 
 
 	//
 	//