提交 f077b1cb 编写于 作者: M Mr.doob

ColladaLoader: Clean up diffuse parsing.

上级 4a0ead8c
......@@ -3775,6 +3775,13 @@ THREE.ColladaLoader = function () {
props[ 'shading' ] = preferredShading;
props[ 'side' ] = this.effect.doubleSided ? THREE.DoubleSide : THREE.FrontSide;
if ( props.diffuse !== undefined ) {
props.color = props.diffuse;
delete props.diffuse;
}
switch ( this.type ) {
case 'constant':
......@@ -3786,14 +3793,12 @@ THREE.ColladaLoader = function () {
case 'phong':
case 'blinn':
if (props.diffuse != undefined) props.color = props.diffuse;
this.material = new THREE.MeshPhongMaterial( props );
break;
case 'lambert':
default:
if (props.diffuse != undefined) props.color = props.diffuse;
this.material = new THREE.MeshLambertMaterial( props );
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册