diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index 5d7334444cf59654591711ba85d1d4a0be210b32..abd2b6ba380eb8f16ec36382958946e92bc74bf6 100644 --- a/src/Three.Legacy.js +++ b/src/Three.Legacy.js @@ -126,6 +126,13 @@ Object.assign( Box3.prototype, { } } ); +Object.assign( Line3.prototype, { + center: function ( optionalTarget ) { + console.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' ); + return this.getCenter( optionalTarget ); + } +} ); + Object.assign( Matrix3.prototype, { multiplyVector3: function ( vector ) { console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' ); diff --git a/src/math/Line3.js b/src/math/Line3.js index 881777623da8b5d9fa345462d5f95616058f5700..aa764ae782b0f54bb53fd650021af09cc5f3395d 100644 --- a/src/math/Line3.js +++ b/src/math/Line3.js @@ -40,7 +40,7 @@ Line3.prototype = { }, - center: function ( optionalTarget ) { + getCenter: function ( optionalTarget ) { var result = optionalTarget || new Vector3(); return result.addVectors( this.start, this.end ).multiplyScalar( 0.5 );