Skip to content

Commit 027a01f

Browse files
committed
Updated builds.
1 parent 5578c05 commit 027a01f

File tree

2 files changed

+382
-361
lines changed

2 files changed

+382
-361
lines changed

build/three.js

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6286,17 +6286,17 @@
62866286

62876287
},
62886288

6289-
center: function ( optionalTarget ) {
6289+
getCenter: function ( optionalTarget ) {
62906290

62916291
var result = optionalTarget || new Vector2();
6292-
return result.addVectors( this.min, this.max ).multiplyScalar( 0.5 );
6292+
return this.isEmpty() ? result.set( 0, 0 ) : result.addVectors( this.min, this.max ).multiplyScalar( 0.5 );
62936293

62946294
},
62956295

6296-
size: function ( optionalTarget ) {
6296+
getSize: function ( optionalTarget ) {
62976297

62986298
var result = optionalTarget || new Vector2();
6299-
return result.subVectors( this.max, this.min );
6299+
return this.isEmpty() ? result.set( 0, 0 ) : result.subVectors( this.max, this.min );
63006300

63016301
},
63026302

@@ -7936,17 +7936,17 @@
79367936

79377937
},
79387938

7939-
center: function ( optionalTarget ) {
7939+
getCenter: function ( optionalTarget ) {
79407940

79417941
var result = optionalTarget || new Vector3();
79427942
return this.isEmpty() ? result.set( 0, 0, 0 ) : result.addVectors( this.min, this.max ).multiplyScalar( 0.5 );
79437943

79447944
},
79457945

7946-
size: function ( optionalTarget ) {
7946+
getSize: function ( optionalTarget ) {
79477947

79487948
var result = optionalTarget || new Vector3();
7949-
return result.subVectors( this.max, this.min );
7949+
return this.isEmpty() ? result.set( 0, 0, 0 ) : result.subVectors( this.max, this.min );
79507950

79517951
},
79527952

@@ -8129,7 +8129,7 @@
81298129

81308130
var result = optionalTarget || new Sphere();
81318131

8132-
result.center = this.center();
8132+
result.center = this.getCenter();
81338133
result.radius = this.size( v1 ).length() * 0.5;
81348134

81358135
return result;
@@ -8251,7 +8251,7 @@
82518251

82528252
} else {
82538253

8254-
box.setFromPoints( points ).center( center );
8254+
box.setFromPoints( points ).getCenter( center );
82558255

82568256
}
82578257

@@ -11453,7 +11453,7 @@
1145311453

1145411454
this.computeBoundingBox();
1145511455

11456-
var offset = this.boundingBox.center().negate();
11456+
var offset = this.boundingBox.getCenter().negate();
1145711457

1145811458
this.translate( offset.x, offset.y, offset.z );
1145911459

@@ -12892,7 +12892,7 @@
1289212892

1289312893
this.computeBoundingBox();
1289412894

12895-
var offset = this.boundingBox.center().negate();
12895+
var offset = this.boundingBox.getCenter().negate();
1289612896

1289712897
this.translate( offset.x, offset.y, offset.z );
1289812898

@@ -13232,7 +13232,7 @@
1323213232
var center = this.boundingSphere.center;
1323313233

1323413234
box.setFromArray( array );
13235-
box.center( center );
13235+
box.getCenter( center );
1323613236

1323713237
// hoping to find a boundingSphere with a radius smaller than the
1323813238
// boundingSphere of the boundingBox: sqrt(3) smaller in the best case
@@ -26460,13 +26460,17 @@
2646026460

2646126461
// flush last keyframe (compaction looks ahead)
2646226462

26463-
times[ writeIndex ] = times[ lastIndex ];
26463+
if ( lastIndex > 0 ) {
2646426464

26465-
for ( var readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j )
26465+
times[ writeIndex ] = times[ lastIndex ];
2646626466

26467-
values[ writeOffset + j ] = values[ readOffset + j ];
26467+
for ( var readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j )
2646826468

26469-
++ writeIndex;
26469+
values[ writeOffset + j ] = values[ readOffset + j ];
26470+
26471+
++ writeIndex;
26472+
26473+
}
2647026474

2647126475
if ( writeIndex !== times.length ) {
2647226476

@@ -40122,7 +40126,7 @@
4012240126

4012340127
this.box.size( this.scale );
4012440128

40125-
this.box.center( this.position );
40129+
this.box.getCenter( this.position );
4012640130

4012740131
};
4012840132

@@ -40757,17 +40761,29 @@
4075740761
//
4075840762

4075940763
Object.assign( Box2.prototype, {
40764+
center: function ( optionalTarget ) {
40765+
console.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' );
40766+
return this.getCenter( optionalTarget );
40767+
},
4076040768
empty: function () {
4076140769
console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
4076240770
return this.isEmpty();
4076340771
},
4076440772
isIntersectionBox: function ( box ) {
4076540773
console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );
4076640774
return this.intersectsBox( box );
40775+
},
40776+
size: function ( optionalTarget ) {
40777+
console.warn( 'THREE.Box2: .size() has been renamed to .getSize().' );
40778+
return this.getSize( optionalTarget );
4076740779
}
4076840780
} );
4076940781

4077040782
Object.assign( Box3.prototype, {
40783+
center: function ( optionalTarget ) {
40784+
console.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' );
40785+
return this.getCenter( optionalTarget );
40786+
},
4077140787
empty: function () {
4077240788
console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );
4077340789
return this.isEmpty();
@@ -40779,6 +40795,10 @@
4077940795
isIntersectionSphere: function ( sphere ) {
4078040796
console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
4078140797
return this.intersectsSphere( sphere );
40798+
},
40799+
size: function ( optionalTarget ) {
40800+
console.warn( 'THREE.Box3: .size() has been renamed to .getSize().' );
40801+
return this.getSize( optionalTarget );
4078240802
}
4078340803
} );
4078440804

0 commit comments

Comments
 (0)