Explorar o código

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

Mr.doob %!s(int64=10) %!d(string=hai) anos
pai
achega
48b299b23b
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  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 () {