Skip to main content

News

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

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere 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?
miniSphere 4.8.4 - Cell compiler - SSj debugger
Forum Thread | GitHub Repo

  • 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?

  • Flying Jester
  • [*]
  • Verified
  • TurboSphere Developer
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.