Spherical forums

Creations => Programming => Topic started by: Fat Cerberus on December 13, 2015, 01:58:02 pm

Title: ArrayBuffer polyfill for ES3/5 engines
Post by: Fat Cerberus on December 13, 2015, 01:58:02 pm
I just found this while aimlessly Googling around:
https://gist.github.com/Benvie/5020656

It's a complete implementation of the ArrayBuffer and DataView objects (but not typed arrays, apparently) for non-supporting JS engines, including ES3.  It might be interesting to see how this performs in Sphere 1.x; I'd expect it to be pretty slow compared to natively-implemented buffers, but who knows?
Title: Re: ArrayBuffer polyfill for ES3/5 engines
Post by: N E O on December 13, 2015, 02:16:42 pm

I just found this while aimlessly Googling around:
https://gist.github.com/Benvie/5020656

It's a complete implementation of the ArrayBuffer and DataView objects (but not typed arrays, apparently) for non-supporting JS engines, including ES3.  It might be interesting to see how this performs in Sphere 1.x; I'd expect it to be pretty slow compared to natively-implemented buffers, but who knows?


Is there already an ArrayBuffer fill for Sphere that uses ByteArray?
Title: Re: ArrayBuffer polyfill for ES3/5 engines
Post by: Flying Jester on December 13, 2015, 09:19:45 pm
@NEO Are you thinking of my polyfill? That worked the other way around, implementing ByteArrays using ArrayBuffers.