Ver Fonte

BufferGeometry: Compute BoundingBox/Sphere after applyMatrix(). #6167

Mr.doob há 10 anos atrás
pai
commit
48b299b23b
1 ficheiros alterados com 12 adições e 0 exclusões
  1. 12 0
      src/core/BufferGeometry.js

+ 12 - 0
src/core/BufferGeometry.js

@@ -84,6 +84,18 @@ THREE.BufferGeometry.prototype = {
 
 		}
 
+		if ( this.boundingBox instanceof THREE.Box3 ) {
+
+			this.computeBoundingBox();
+
+		}
+
+		if ( this.boundingSphere instanceof THREE.Sphere ) {
+
+			this.computeBoundingSphere();
+
+		}
+
 	},
 
 	center: function () {