Skip to main content

News

Topic: ArrayBuffer polyfill for ES3/5 engines (Read 4476 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
ArrayBuffer polyfill for ES3/5 engines
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?
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: ArrayBuffer polyfill for ES3/5 engines
Reply #1

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?

Re: ArrayBuffer polyfill for ES3/5 engines
Reply #2
@NEO Are you thinking of my polyfill? That worked the other way around, implementing ByteArrays using ArrayBuffers.