Explorar o código

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

Mr.doob %!s(int64=12) %!d(string=hai) anos
pai
achega
31b77223f0
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  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 );