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

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



On Oct 6, 2010, at 12:03 AM, Chris Marrin wrote:
>> 
>> My use case here would be to send, as single  JSON file, a complete 3d model in a format parsable by javascript. In the ideal case, that 3d model could include shader code, and binary data. JSON can be parsed using the built-in accelerated function for doing so, but then you need a way of transforming likely large blocks of text to array buffers.
> 
> But what do these strings contain? Unicode characters which correspond to some sort of encoded binary representation of floating point values?

Or integer values, yes.

> If so, then you'll need some way to convert from a pure binary form into your encoded form.

Well, if base64 was used, as suggested upthread (which would be excellent), there will be many libraries.

> At that point wouldn't it be easier to use XHR and send the binary data directly?


For example, with user generated content, or javascript opengl libraries that can run only on the client without worrying about the server. 

Additionally, sending the binary data separately might require another server round trip.


-----------------------------------------------------------
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: