MCPcopy
hub / github.com/mrdoob/three.js / transposeIntoArray

Method transposeIntoArray

src/math/Matrix3.js:364–380  ·  view source on GitHub ↗

* Transposes this matrix into the supplied array, and returns itself unchanged. * * @param {Array } r - An array to store the transposed matrix elements. * @return {Matrix3} A reference to this matrix.

( r )

Source from the content-addressed store, hash-verified

362 * @return {Matrix3} A reference to this matrix.
363 */
364 transposeIntoArray( r ) {
365
366 const m = this.elements;
367
368 r[ 0 ] = m[ 0 ];
369 r[ 1 ] = m[ 3 ];
370 r[ 2 ] = m[ 6 ];
371 r[ 3 ] = m[ 1 ];
372 r[ 4 ] = m[ 4 ];
373 r[ 5 ] = m[ 7 ];
374 r[ 6 ] = m[ 2 ];
375 r[ 7 ] = m[ 5 ];
376 r[ 8 ] = m[ 8 ];
377
378 return this;
379
380 }
381
382 /**
383 * Sets the UV transform matrix from offset, repeat, rotation, and center.

Callers 1

Matrix3.tests.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected