Skip to content

Commit 1919742

Browse files
committed
Line3: Renamed center() to getCenter(). See 5578c05
1 parent a966046 commit 1919742

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Three.Legacy.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ Object.assign( Box3.prototype, {
126126
}
127127
} );
128128

129+
Object.assign( Line3.prototype, {
130+
center: function ( optionalTarget ) {
131+
console.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' );
132+
return this.getCenter( optionalTarget );
133+
}
134+
} );
135+
129136
Object.assign( Matrix3.prototype, {
130137
multiplyVector3: function ( vector ) {
131138
console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );

src/math/Line3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Line3.prototype = {
4040

4141
},
4242

43-
center: function ( optionalTarget ) {
43+
getCenter: function ( optionalTarget ) {
4444

4545
var result = optionalTarget || new Vector3();
4646
return result.addVectors( this.start, this.end ).multiplyScalar( 0.5 );

0 commit comments

Comments
 (0)