diff --git a/docs/api/math/Vector2.html b/docs/api/math/Vector2.html index 76d3e05a740ccea1c22b6dadda7e297a987fc7ba..34651dc5feeb804aa1636ad810b06ab2c133284c 100644 --- a/docs/api/math/Vector2.html +++ b/docs/api/math/Vector2.html @@ -148,7 +148,7 @@

[method:Float distanceTo]( [page:Vector2 v] )

Computes the distance from this vector to [page:Vector2 v].
-

[method:Float distanceToManhattan]( [page:Vector2 v] )

+

[method:Float manhattanDistanceTo]( [page:Vector2 v] )

Computes the [link:https://en.wikipedia.org/wiki/Taxicab_geometry Manhattan distance] from this vector to [page:Vector2 v].
diff --git a/docs/api/math/Vector3.html b/docs/api/math/Vector3.html index 216b7daa6ff6b60dae3dcee360912064a5831032..add11dff96d84aaeefacd7e9fe0e574a5e428bf3 100644 --- a/docs/api/math/Vector3.html +++ b/docs/api/math/Vector3.html @@ -178,7 +178,7 @@ var d = a.distanceTo( b );

[method:Float distanceTo]( [page:Vector3 v] )

Computes the distance from this vector to [page:Vector3 v].
-

[method:Float distanceToManhattan]( [page:Vector3 v] )

+

[method:Float manhattanDistanceTo]( [page:Vector3 v] )

Computes the [link:https://en.wikipedia.org/wiki/Taxicab_geometry Manhattan distance] from this vector to [page:Vector3 v].
diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index 2740d84655bbbb70dd21649feffa0672d0d62d48..e9c189803986b51f57b91a6070bd36ace8e8952b 100644 --- a/src/Three.Legacy.js +++ b/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 ); } diff --git a/src/math/Vector2.js b/src/math/Vector2.js index 38f217aabacbbf6dad78135a23d1931dafcc41b3..ae2987784e67d8391b04e4a5f61a4a6e41e4b889 100644 --- a/src/math/Vector2.js +++ b/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 ); diff --git a/src/math/Vector3.js b/src/math/Vector3.js index 381c24087141b23deddfb7b58083050cdcc5512f..552d343818a979ea6cc8cfb0f73f3ed7c3102e89 100644 --- a/src/math/Vector3.js +++ b/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 );