Skip to content

Commit

Permalink
ColladaLoader: added check for existence of diffuse/emissive properti…
Browse files Browse the repository at this point in the history
…es before Material creation in Shader
  • Loading branch information
David Gossow committed Dec 11, 2012
1 parent ed74b82 commit b10de61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/js/loaders/ColladaLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -4492,4 +4492,4 @@ THREE.ColladaLoader = function () {

};

};
};

0 comments on commit b10de61

Please sign in to comment.