提交 7695c253 编写于 作者: G gero3

update to make it less dependaned

上级 57b94936
......@@ -45,40 +45,24 @@ THREE.Material.prototype.setValues = function ( values ) {
var value = values[ key ];
if ( this[ key ] !== undefined ) {
if ( this[ key ] !== undefined && key !== "id") {
switch ( key ) {
case "id":
break;
case "color":
case "ambient":
case "emissive":
case "specular":
if ( value instanceof THREE.Color ) {
this[ key ].copy( value );
} else {
this[ key ].setHex( value );
}
break;
case "wrapRGB":
if (this[key] instanceof THREE.Color) {
if ( value instanceof THREE.Color ) {
this[ key ].copy( value );
break;
default:
} else {
this[ key ] = value;
this[ key ].setHex( value );
}
} else if (this[key] instanceof THREE.Vector3){
this[ key ].copy( value );
} else {
this[ key ] = value;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册