Ver código fonte

Box3.setFromObject(): handle empty children

WestLangley 9 anos atrás
pai
commit
7cb156d024
1 arquivos alterados com 7 adições e 3 exclusões
  1. 7 3
      src/math/Box3.js

+ 7 - 3
src/math/Box3.js

@@ -116,9 +116,13 @@ THREE.Box3.prototype = {
 
 					}
 
-					box.copy( geometry.boundingBox );
-					box.applyMatrix4( node.matrixWorld );
-					scope.union( box );
+					if ( ! geometry.boundingBox.isEmpty() ) {
+
+						box.copy( geometry.boundingBox );
+						box.applyMatrix4( node.matrixWorld );
+						scope.union( box );
+
+					}
 
 				}