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

Method fromArray

src/math/Vector3.js:1168–1176  ·  view source on GitHub ↗

* Sets this vector's x value to be `array[ offset ]`, y value to be `array[ offset + 1 ]` * and z value to be `array[ offset + 2 ]`. * * @param {Array } array - An array holding the vector component values. * @param {number} [offset=0] - The offset into the array. * @return {Vector3

( array, offset = 0 )

Source from the content-addressed store, hash-verified

1166 * @return {Vector3} A reference to this vector.
1167 */
1168 fromArray( array, offset = 0 ) {
1169
1170 this.x = array[ offset ];
1171 this.y = array[ offset + 1 ];
1172 this.z = array[ offset + 2 ];
1173
1174 return this;
1175
1176 }
1177
1178 /**
1179 * Writes the components of this vector to the given array. If no array is provided,

Callers 7

setFromMatrixColumnMethod · 0.95
setFromMatrix3ColumnMethod · 0.95
modifyMethod · 0.95
buildExtrusionNodeMethod · 0.95
parseNodeMethod · 0.95
constructorMethod · 0.95
constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected