Browse Source

Editor: Clean up Menubar.Edit.

Mr.doob 10 years ago
parent
commit
1085524a6c
1 changed files with 6 additions and 6 deletions
  1. 6 6
      editor/js/Menubar.Edit.js

+ 6 - 6
editor/js/Menubar.Edit.js

@@ -62,16 +62,16 @@ Menubar.Edit = function ( editor ) {
 
 		if ( confirm( 'Flatten ' + object.name + '?' ) === false ) return;
 
-		var geometry = object.geometry.clone();
-		geometry.applyMatrix( object.matrix );
+		var geometry = object.geometry;
 
-		object.geometry = geometry;
+		geometry.applyMatrix( object.matrix );
+		geometry.verticesNeedUpdate = true;
+		geometry.normalsNeedUpdate = true;
 
 		object.position.set( 0, 0, 0 );
 		object.rotation.set( 0, 0, 0 );
 		object.scale.set( 1, 1, 1 );
-		
-		object.geometry.buffersNeedUpdate = true;
+
 		editor.signals.objectChanged.dispatch( object );
 
 	} );
@@ -79,4 +79,4 @@ Menubar.Edit = function ( editor ) {
 
 	return container;
 
-};
+};