소스 검색

CmdRemoveObject: simplification

Daniel 10 년 전
부모
커밋
abd5aad2b0
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      editor/js/CmdRemoveObject.js

+ 2 - 4
editor/js/CmdRemoveObject.js

@@ -24,15 +24,13 @@ CmdRemoveObject = function ( object ) {
 
 		if ( object.geometry !== undefined ) {
 
-			this.objectJSON.geometries = [];
-			this.objectJSON.geometries.push( object.geometry.toJSON( meta ) );
+			this.objectJSON.geometries = [ object.geometry.toJSON( meta ) ];
 
 		}
 
 		if ( object.material !== undefined ) {
 
-			this.objectJSON.materials = [];
-			this.objectJSON.materials.push( object.material.toJSON( meta ) );
+			this.objectJSON.materials = [ object.material.toJSON( meta ) ];
 
 		}