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

Re: [Public WebGL] ArrayBuffer, Concatenation and String-Array Conversion, a proposal



On 10/05/2010 02:20 PM, Vladimir Vukicevic wrote:

Sending this stuff as text is generally not a good idea, no matter how it's done; it'll be inefficient for the browser/js engine to work with, at the very least. In this case a two-file solution, one JSON and one raw binary, would probably be the most efficient. I understand the desire to work with a single file, though. One thing we could do is add something to the DataView class for reading/writing strings to/from an ArrayBuffer using a given format; that might be a fairly natural fit for that type of functionality (which has been requested in other contexts as well -- e.g. reading a binary file that has an embedded string that refers to a texture file or something).
Yes that's a good idea - I've already encountered that use case.

The other large binary data set apart from vertex buffers seems to be animation data. In recent conversations in the collada group it was pointed out that animation data is often significantly larger than mesh data (by several times), and the TypedArray spec is an excellent mechanism for breaking it up into useful chunks and passing it into a WebGL app.


If anyone is interested I have a sample of the 'two file' solution which I'm happy to share.


Alan

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: