Browse Source

Allow morphTargets to be undefined in DepthPassPlugin

J. Tanner Netterville 11 years ago
parent
commit
4d1a5c7610
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/extras/renderers/plugins/DepthPassPlugin.js

+ 1 - 1
src/extras/renderers/plugins/DepthPassPlugin.js

@@ -121,7 +121,7 @@ THREE.DepthPassPlugin = function () {
 
 
 				if ( objectMaterial ) _renderer.setMaterialFaces( object.material );
 				if ( objectMaterial ) _renderer.setMaterialFaces( object.material );
 
 
-				useMorphing = object.geometry.morphTargets.length > 0 && objectMaterial.morphTargets;
+				useMorphing = typeof(object.geometry.morphTargets) !== 'undefined' && object.geometry.morphTargets.length > 0 && objectMaterial.morphTargets;
 				useSkinning = object instanceof THREE.SkinnedMesh && objectMaterial.skinning;
 				useSkinning = object instanceof THREE.SkinnedMesh && objectMaterial.skinning;
 
 
 				if ( object.customDepthMaterial ) {
 				if ( object.customDepthMaterial ) {