Skip to content

Commit 1e50c94

Browse files
committed
Rename Matrix*.multiplyVector3Array() to Matrix*.applyToVector3Array()
1 parent 12bf304 commit 1e50c94

File tree

5 files changed

+24
-10
lines changed

5 files changed

+24
-10
lines changed

docs/api/math/Matrix3.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ <h3>.multiplyScalar([page:Float scalar]) [page:Matrix3 this]</h3>
9292
Multiply every component of the matrix by a scalar value.
9393
</div>
9494

95-
<h3>.multiplyVector3Array([page:Array array]) [page:Array]</h3>
95+
<h3>.applyToVector3Array([page:Array array]) [page:Array]</h3>
9696
<div>
9797
array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
9898
</div>
9999
<div>
100-
Multiply (apply) this matrix against every vector3 in the array.
100+
Multiply (apply) this matrix to every vector3 in the array.
101101
</div>
102102

103103
<h3>.getNormalMatrix([page:Matrix4 matrix4]) [page:Matrix3 this]</h3>

docs/api/math/Matrix4.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ <h3>.clone() [page:Matrix4]</h3>
229229
Clones this matrix.
230230
</div>
231231

232-
<h3>.multiplyVector3Array([page:Array a]) [page:Array]</h3>
232+
<h3>.applyToVector3Array([page:Array a]) [page:Array]</h3>
233233
<div>
234234
array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
235235
</div>
236236
<div>
237-
Multiply (apply) this matrix against every vector3 in the array.
237+
Multiply (apply) this matrix to every vector3 in the array.
238238
</div>
239239

240240
<h3>.getMaxScaleOnAxis() [page:Float]</h3>

src/core/BufferGeometry.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ THREE.BufferGeometry.prototype = {
6666

6767
if ( position !== undefined ) {
6868

69-
matrix.multiplyVector3Array( position.array );
69+
matrix.applyToVector3Array( position.array );
7070
position.needsUpdate = true;
7171

7272
}
@@ -77,7 +77,7 @@ THREE.BufferGeometry.prototype = {
7777

7878
var normalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
7979

80-
normalMatrix.multiplyVector3Array( normal.array );
80+
normalMatrix.applyToVector3Array( normal.array );
8181
normal.needsUpdate = true;
8282

8383
}

src/math/Matrix3.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,14 @@ THREE.Matrix3.prototype = {
7070

7171
},
7272

73-
multiplyVector3Array: function() {
73+
multiplyVector3Array: function ( a ) {
74+
75+
console.warn( 'DEPRECATED: Matrix3\'s .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
76+
return this.applyToVector3Array( a );
77+
78+
},
79+
80+
applyToVector3Array: function() {
7481

7582
var v1 = new THREE.Vector3();
7683

@@ -82,7 +89,7 @@ THREE.Matrix3.prototype = {
8289
v1.y = a[ i + 1 ];
8390
v1.z = a[ i + 2 ];
8491

85-
v1.applyMatrix3(this);
92+
v1.applyMatrix3( this );
8693

8794
a[ i ] = v1.x;
8895
a[ i + 1 ] = v1.y;

src/math/Matrix4.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,14 @@ THREE.Matrix4.prototype = {
427427

428428
},
429429

430-
multiplyVector3Array: function() {
430+
multiplyVector3Array: function ( a ) {
431+
432+
console.warn( 'DEPRECATED: Matrix4\'s .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
433+
return this.applyToVector3Array( a );
434+
435+
},
436+
437+
applyToVector3Array: function() {
431438

432439
var v1 = new THREE.Vector3();
433440

@@ -439,7 +446,7 @@ THREE.Matrix4.prototype = {
439446
v1.y = a[ i + 1 ];
440447
v1.z = a[ i + 2 ];
441448

442-
v1.applyProjection( this );
449+
v1.applyMatrix4( this );
443450

444451
a[ i ] = v1.x;
445452
a[ i + 1 ] = v1.y;

0 commit comments

Comments
 (0)