提交 b10de610 编写于 作者: D David Gossow

ColladaLoader: added check for existence of diffuse/emissive properties before...

ColladaLoader: added check for existence of diffuse/emissive properties before Material creation in Shader
上级 ed74b827
......@@ -3193,21 +3193,21 @@ THREE.ColladaLoader = function () {
case 'constant':
props.color = props.emission;
if (props.emissive != undefined) props.color = props.emissive;
this.material = new THREE.MeshBasicMaterial( props );
break;
case 'phong':
case 'blinn':
props.color = props.diffuse;
if (props.diffuse != undefined) props.color = props.diffuse;
this.material = new THREE.MeshPhongMaterial( props );
break;
case 'lambert':
default:
props.color = props.diffuse;
if (props.diffuse != undefined) props.color = props.diffuse;
this.material = new THREE.MeshLambertMaterial( props );
break;
......@@ -4492,4 +4492,4 @@ THREE.ColladaLoader = function () {
};
};
\ No newline at end of file
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册