Explorar el Código

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

Mr.doob hace 11 años
padre
commit
48b299b23b
Se han modificado 1 ficheros con 12 adiciones y 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 () {

粤ICP备19079148号