浏览代码

Update code style

Temdog007 6 年之前
父节点
当前提交
cc96ff0692
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      editor/js/Sidebar.Material.js

+ 5 - 4
editor/js/Sidebar.Material.js

@@ -624,12 +624,13 @@ Sidebar.Material = function ( editor ) {
 
 			}
 
-			if ( material.depthPacking !== undefined) {
+			if ( material.depthPacking !== undefined ) {
+
+				var depthPacking = parseInt( materialDepthPacking.getValue() );
+				if ( material.depthPacking !== depthPacking ) {
 
-				var depthPacking = parseInt(materialDepthPacking.getValue());
-				if(material.depthPacking !== depthPacking)
-				{
 					editor.execute( new SetMaterialValueCommand( currentObject, 'depthPacking', depthPacking, currentMaterialSlot ) );
+
 				}
 
 			}