Explorar o código

I guess we can start adding some warning here and there.

Mr.doob %!s(int64=13) %!d(string=hai) anos
pai
achega
e60c179536
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/materials/Material.js

+ 6 - 1
src/materials/Material.js

@@ -45,7 +45,12 @@ THREE.Material.prototype.setValues = function ( values ) {
 
 		var newValue = values[ key ];
 
-		if ( newValue === undefined ) continue;
+		if ( newValue === undefined ) {
+
+			console.warn( 'THREE.Material: \'' + key + '\' parameter is undefined.' );
+			continue;
+
+		}
 
 		if ( key in this ) {