For some reason, I can't get .slice() to work with a Float32Array. If you replace Float32Array by Array, it works perfectly fine. The doc for Float32Array lists .slice() as a method, so I don't understand if there's a bug or something? Or is it 2:00 AM and I can't see something obvious?
function test()
{
var buf = new Float32Array( 10 );
for (var i = 0; i < 10; i++) {
buf[i] = i*0.3;
}
var test = buf.slice(2,5);
alert("Hello, Coding Ground!" + test[0]);
}
test();
Check How to convert a JavaScript Typed Array into a JavaScript Array