浏览代码

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

Mr.doob 13 年之前
父节点
当前提交
e60c179536
共有 1 个文件被更改,包括 6 次插入1 次删除
  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 ) {