瀏覽代碼

Material: Remove unnecessary conditional branch. From @cjshannon.
Sorry, I couldn't merge cleanly nor cherry-pick.

Mr.doob 12 年之前
父節點
當前提交
31b77223f0
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      src/materials/Material.js

+ 1 - 5
src/materials/Material.js

@@ -65,11 +65,7 @@ THREE.Material.prototype = {
 
 				var currentValue = this[ key ];
 
-				if ( currentValue instanceof THREE.Color && newValue instanceof THREE.Color ) {
-
-					currentValue.copy( newValue );
-
-				} else if ( currentValue instanceof THREE.Color ) {
+				if ( currentValue instanceof THREE.Color ) {
 
 					currentValue.set( newValue );