فهرست منبع

Merge pull request #12386 from WestLangley/dev-manhattan

distanceToManhattan() -> manhattanDistanceTo()
Mr.doob 7 سال پیش
والد
کامیت
095e9d328a
5فایلهای تغییر یافته به همراه19 افزوده شده و 7 حذف شده
  1. 1 1
      docs/api/math/Vector2.html
  2. 1 1
      docs/api/math/Vector3.html
  3. 15 3
      src/Three.Legacy.js
  4. 1 1
      src/math/Vector2.js
  5. 1 1
      src/math/Vector3.js

+ 1 - 1
docs/api/math/Vector2.html

@@ -148,7 +148,7 @@
 		<h3>[method:Float distanceTo]( [page:Vector2 v] )</h3>
 		<div>Computes the distance from this vector to [page:Vector2 v].</div>
 
-		<h3>[method:Float distanceToManhattan]( [page:Vector2 v] )</h3>
+		<h3>[method:Float manhattanDistanceTo]( [page:Vector2 v] )</h3>
 		<div>
 		Computes the [link:https://en.wikipedia.org/wiki/Taxicab_geometry Manhattan distance] from this vector to [page:Vector2 v].
 		</div>

+ 1 - 1
docs/api/math/Vector3.html

@@ -178,7 +178,7 @@ var d = a.distanceTo( b );
 		<h3>[method:Float distanceTo]( [page:Vector3 v] )</h3>
 		<div>Computes the distance from this vector to [page:Vector3 v].</div>
 
-		<h3>[method:Float distanceToManhattan]( [page:Vector3 v] )</h3>
+		<h3>[method:Float manhattanDistanceTo]( [page:Vector3 v] )</h3>
 		<div>
 		Computes the [link:https://en.wikipedia.org/wiki/Taxicab_geometry Manhattan distance] from this vector to [page:Vector3 v].
 		</div>

+ 15 - 3
src/Three.Legacy.js

@@ -657,9 +657,15 @@ Object.assign( Vector2.prototype, {
 
 	fromAttribute: function ( attribute, index, offset ) {
 
-		console.error( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );
+		console.warn( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );
 		return this.fromBufferAttribute( attribute, index, offset );
 
+	},
+	distanceToManhattan: function ( v ) {
+
+		console.warn( 'THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
+		return this.manhattanDistanceTo( v );
+
 	}
 
 } );
@@ -702,9 +708,15 @@ Object.assign( Vector3.prototype, {
 	},
 	fromAttribute: function ( attribute, index, offset ) {
 
-		console.error( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );
+		console.warn( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );
 		return this.fromBufferAttribute( attribute, index, offset );
 
+	},
+	distanceToManhattan: function ( v ) {
+
+		console.warn( 'THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
+		return this.manhattanDistanceTo( v );
+
 	}
 
 } );
@@ -713,7 +725,7 @@ Object.assign( Vector4.prototype, {
 
 	fromAttribute: function ( attribute, index, offset ) {
 
-		console.error( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );
+		console.warn( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );
 		return this.fromBufferAttribute( attribute, index, offset );
 
 	}

+ 1 - 1
src/math/Vector2.js

@@ -402,7 +402,7 @@ Object.assign( Vector2.prototype, {
 
 	},
 
-	distanceToManhattan: function ( v ) {
+	manhattanDistanceTo: function ( v ) {
 
 		return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y );
 

+ 1 - 1
src/math/Vector3.js

@@ -623,7 +623,7 @@ Object.assign( Vector3.prototype, {
 
 	},
 
-	distanceToManhattan: function ( v ) {
+	manhattanDistanceTo: function ( v ) {
 
 		return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z );