function flatten( v ) { if(!Array.isArray(v)) return v; if(typeof(v[0])=='number'){ var floats = new Float32Array( v.length ); for(var i = 0; i