From b10de6101be1fe97e952ddaeeb8245e0149ff1b3 Mon Sep 17 00:00:00 2001 From: David Gossow Date: Tue, 11 Dec 2012 12:19:12 -0800 Subject: [PATCH] ColladaLoader: added check for existence of diffuse/emissive properties before Material creation in Shader --- examples/js/loaders/ColladaLoader.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/js/loaders/ColladaLoader.js b/examples/js/loaders/ColladaLoader.js index dbb3f2b60ecee3..c52ca392148d58 100644 --- a/examples/js/loaders/ColladaLoader.js +++ b/examples/js/loaders/ColladaLoader.js @@ -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 +};