[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Re: Typed Array spec nitpicks

On Mon, Apr 12, 2010 at 12:02 PM, Joshua Bell <josh@lindenlab.com> wrote:
For experimental purposes unrelated to WebGL, I implemented https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/TypedArray-spec.html as closely as I could in ECMAScript 3, and observed a few issues:

FYI, this "close enough" implementation of the Typed Array draft in ES3 is now live as part of this collection of LLSD[1] implementations:


Specifically, the tip is at:


I implemented this since I was doing binary resource serialization and wanted a decent abstraction; Typed Arrays fit the bill nicely. I admit I went a little overboard, since I'm only actually packing/unpacking float64, int32 and uint32 values.

It implements the May 17th draft with the addition of get/set as aliases for indexers (although there's an ES5 approach that makes indexers work, albeit inefficiently), and it includes the Float/Double -> Float32/Float64 rename that's been discussed.

This is probably not of any utility to folks on this list, but I figured it couldn't hurt to share it. There are also some unit tests buried one folder down.

[1] http://tools.ietf.org/html/draft-hamrick-vwrap-type-system-00