Skip to main content

News

Topic: ArrayBuffer polyfill for ES3/5 engines (Read 1109 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 5.0b4 (stable: 4.8.8) - Cell compiler - SSj debugger - thread | on GitHub
For the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan

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