Pārlūkot izejas kodu

Allow morphTargets to be undefined in DepthPassPlugin

J. Tanner Netterville 11 gadi atpakaļ
vecāks
revīzija
4d1a5c7610
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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 );
 
-				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;
 
 				if ( object.customDepthMaterial ) {