Pārlūkot izejas kodu

Line3: Renamed center() to getCenter(). See 5578c057a95b84972f80fecf134485e9666f0ea3

Mr.doob 9 gadi atpakaļ
vecāks
revīzija
1919742187
2 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 7 0
      src/Three.Legacy.js
  2. 1 1
      src/math/Line3.js

+ 7 - 0
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.' );

+ 1 - 1
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 );