Jelajahi Sumber

BufferGeometry: Added box.makeEmpty() in computeBoundingSphere. Fixes #4277.

Mr.doob 11 tahun lalu
induk
melakukan
f2b9ad4cf0
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      src/core/BufferGeometry.js

+ 2 - 0
src/core/BufferGeometry.js

@@ -167,6 +167,8 @@ THREE.BufferGeometry.prototype = {
 
 			if ( positions ) {
 
+				box.makeEmpty();
+
 				var center = this.boundingSphere.center;
 
 				for ( var i = 0, il = positions.length; i < il; i += 3 ) {