Browse Source

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

Mr.doob 11 years ago
parent
commit
f2b9ad4cf0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/core/BufferGeometry.js

+ 2 - 0
src/core/BufferGeometry.js

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