[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] ArrayBuffer, Concatenation and String-Array Conversion, a proposal
- To: Vladimir Vukicevic <firstname.lastname@example.org>
- Subject: Re: [Public WebGL] ArrayBuffer, Concatenation and String-Array Conversion, a proposal
- From: Kenneth Russell <email@example.com>
- Date: Tue, 5 Oct 2010 15:58:39 -0700
- Cc: Samuel Kleiner <firstname.lastname@example.org>, public webgl <email@example.com>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1286319526; bh=AcPEvLoHEfhV05EM4SHSFhdc/UI=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=di8qllRbgeoQABErXY0rwsA8BL3dez0T2wldLYl9DLlPdpSnmnQeGTnstOb9e0FGp MFnp892bbFkrLE4+DVe9A==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/YJYNWWqJg3kYTedrS/XyuWTKW+I66L2B3clGLuSgxQ=; b=Xkcf7Pt9pX9JWnudsTd7YKWhJELosrTtcHZ+unRSdjJHEJSMRD90kQnPmn3RJHxtta ftElprd/K7v/GJU+IGhg==
- Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qUd1GLSPBcOyBzFZDaXjI/0hsN/ySvlmVJNig2LC1h3a6tBFpmHQpc6ujLD2DISe03 dcxifPTvtGc90WR/u+Xg==
- In-reply-to: <17840987.134617.1286313625061.JavaMail.firstname.lastname@example.org>
- References: <73CC171F-23AB-44F9-83BF-8C3C6EC6EFA1@gmail.com> <17840987.134617.1286313625061.JavaMail.email@example.com>
- Sender: firstname.lastname@example.org
On Tue, Oct 5, 2010 at 2:20 PM, Vladimir Vukicevic <email@example.com> wrote:
> ----- Original Message -----
>> > The question here is why isn't there a function for doing these
>> > 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 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
> 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).
The author of node.js raised the issue of encoding and decoding typed
arrays using multiple character encodings a few months ago. See
and follow-ups on the thread. To avoid making the Typed Array
specification too monolithic I think it would be best to factor
conversions to and from strings into a separate specification. However
I would personally be very happy to help implement any such
specification in WebKit.
Would anybody be willing to step up and draft such a spec?
You are currently subscribed to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: