W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2013

Re: comments on Matrix

From: Dean Jackson <dino@apple.com>
Date: Thu, 21 Mar 2013 08:51:44 +1100
Cc: Gregg Tavares <gman@google.com>, Dirk Schulze <dschulze@adobe.com>, "public-fx@w3.org" <public-fx@w3.org>
Message-id: <A2E40AA9-0F1C-411F-8661-71745ECD4ADB@apple.com>
To: Benoit Jacob <jacob.benoit.1@gmail.com>

On 21/03/2013, at 8:30 AM, Benoit Jacob <jacob.benoit.1@gmail.com> wrote:

>>  - is this something for which there exists a consensual choice of API? No, matrix APIs are hard to get people to agree on.
> 
> Both WebGL and WebAudio would not pass here.
> 
> I disagree --- WebGL decided early on to stay very close to OpenGL ES precisely (among other reasons) to get quick consensus on API design, and it's played out very well.

Why are you completely ignoring Direct3D? I assume Microsoft didn't consent. 

>   
>>  - is this something that has a well-defined wanted feature set? No, every matrix library has a different feature set and I don't agree with the feature set that this one currently has.
> 
> Both WebGL and WebAudio would not pass here.
> 
> I disagree. "Let's expose the same feature set as OpenGL ES 2, minus possibly a few ones that are tricky or out of place in a Web API, plus possibly a few extensions" is very well-defined.

If you need extensions, then I don't think you can say it is well defined. And, again, you're ignoring the fact that Direct3D does not have exactly the same feature set. As well as the fact that some people have said that they don't want a 3D graphics technology within HTML (suggesting that WebGL is effectively a black box that doesn't coordinate with HTML at all, so is basically a plugin).

Anyway, this is pointless and almost certainly boring noise to everyone who gets these emails. I'm sorry that I even mentioned other technologies (and to be clear, I'm not at all arguing against WebGL!)

The important thing is the bit below here. How can we make an API that helps Web developers write better/faster code?

Dean

> The goal here is to make the lives of CSS and SVG developers better, and to expose the functionality they already get through transforms. I actually argued against having the decomposition method, and would be ok with it being removed. But otherwise the objective is so that instead of:
> 
> function rotateMyObject(element, delta) {
>   var currentTransform = window.getComputedStyle(element).transform; 
>   // ouch, that's a matrix string... i need to somehow convert it to an object i can use
>   // ... time passes
>   var currentTransformMatrix; // suppose I did that
>   // now I need to rotate it...
>   // I either use some library or do it by hand
>   // ok... now to set the transform...
>   element.style.transform = "matrix3d(" + currentTransformMatrix.array[0] + ", " ......
>   // note the above will have to go through the CSS parser, etc
> }
> 
> Developers could do:
> 
> function rotateMyObject(element, delta) {
>   element.style.transform = window.getComputedStyle(element).transformMatrix.rotate(delta);  // the API to get the typed matrix isn't actually this
> }
> 
> 
> It would be nice if we could come up with something that would address our goals, and also expose a Float32Array so any external matrix library can do things better/faster/whatever.
> 
> Dean
> 
> 
Received on Wednesday, 20 March 2013 21:52:32 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 20 March 2013 21:52:41 GMT