MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / vToNArray

Function vToNArray

libraries/p5.js:33815–33819  ·  view source on GitHub ↗

* turn a p5.Vector Array into a one dimensional number array * @param {Array} arr an array of p5.Vector * @return {Array]} a one dimensional array of numbers * [p5.Vector(1, 2, 3), p5.Vector(4, 5, 6)] -> * [1, 2, 3, 4, 5, 6]

(arr)

Source from the content-addressed store, hash-verified

33813 * [1, 2, 3, 4, 5, 6]
33814 */
33815function vToNArray(arr){
33816 return flatten(arr.map(function(item){
33817 return [item.x, item.y, item.z];
33818 }));
33819}
33820module.exports = p5.RendererGL;
33821
33822},{"../core/core":42}],91:[function(_dereq_,module,exports){

Callers 1

p5.jsFile · 0.85

Calls 1

flattenFunction · 0.85

Tested by

no test coverage detected