W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2014

Re: [geometry] order of arrays

From: Rik Cabanier <cabanier@gmail.com>
Date: Wed, 11 Jun 2014 23:13:21 -0700
Message-ID: <CAGN7qDAh2_a55u9cAQDgddwXcyivF8oP_SRZb-TRkG7WOS5vbg@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: "public-fx@w3.org" <public-fx@w3.org>
On Wed, Jun 11, 2014 at 10:26 PM, Dirk Schulze <dschulze@adobe.com> wrote:

>
> On Jun 12, 2014, at 7:15 AM, Rik Cabanier <cabanier@gmail.com> wrote:
>
> > All,
> >
> > the current spec says that arrays are in [1] column-major order, but it
> seems that WebGL is in row-major order (ie [2]).
> > Can people confirm this? If so, maybe we should update the spec to match.
>
> The spec aims to match CSS Transforms which is column-major order[1]. CSS
> Transforms is also the reason why the indices on the matrix elements seem
> to be the wrong way around… at least compared to mathematical conventions.
>
> It is indeed the question what will be used more. Maybe we can add an
> enumeration enum DOMMatrixOrder { ‘column’, ‘row’ } as argument for
> constructor, getters and setters? What would be the default, still ‘column'?
>

Well, if CSS already specified it in column order, we should just offer
that.
It's easy enough to swap the elements yourself. Maybe this should be a note
in the spec?


> [1] http://dev.w3.org/csswg/css-transforms/#funcdef-matrix3d
>
> >
> > 1: http://dev.w3.org/fxtf/geometry/#dom-dommatrixreadonly-tofloat32array
> > 2: https://github.com/evanw/lightgl.js/blob/master/src/matrix.js
>
>
Received on Thursday, 12 June 2014 06:13:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:49 UTC