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

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

> The question here is why isn't there a function for doing these conversions between JavaScript Strings and Arrays? I suppose the answer is that it's not common enough; storing a unicode value in an array isn't done very much.

I think it will be.

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.

> So JS functions which loop over the string, calling charCodeAt() for each character, give you a reasonable solution. I'm not sure why that would not be a reasonable solution here as well. I'm not sure your example would be commonly used. Assuming we get the ability to read an ArrayBuffer from XHR, the better way to load large vertex data will be to load the binary data directly.

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: