While playing with Flash, I’ve noticed that array access on a Float32Array (using square brackets) always returns NaN. Using getFloat32 with an index works fine. I’m not sure if this is a Lime bug or a Haxe bug. Does anyone else see this behaviour?
I should mention I’m using Lime Next without OpenFL.
This also impacts on transforming a Vector4 with a Matrix4. The result is a vector with NaN for all of its values.
Thanks for bringing this up
I realize that when I wrote this, I expected that “implements ArrayAccess” somehow added the ability to use array access on an object. I realize now that this is really platform-dependent – it just hints that it “can”, not enforcing that it will.
I’m thinking that perhaps the typed array views should be abstract classes, over the ArrayBufferView class. This would remove the ability to
Std.is (object, UInt8Array), unfortunately, but I think it might be best way to get consistency and performance out of the implementation