|
@@ -278,15 +278,21 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
|
|
|
|
|
|
center: function () {
|
|
|
|
|
|
- this.computeBoundingBox();
|
|
|
+ var offset = new Vector3();
|
|
|
|
|
|
- var offset = this.boundingBox.getCenter().negate();
|
|
|
+ return function center() {
|
|
|
|
|
|
- this.translate( offset.x, offset.y, offset.z );
|
|
|
+ this.computeBoundingBox();
|
|
|
|
|
|
- return offset;
|
|
|
+ this.boundingBox.getCenter( offset ).negate();
|
|
|
|
|
|
- },
|
|
|
+ this.translate( offset.x, offset.y, offset.z );
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+ }(),
|
|
|
|
|
|
setFromObject: function ( object ) {
|
|
|
|