On Tue, Jun 3, 2014 at 4:24 AM, Martin Thomson <m...@mozilla.com> wrote:

> > it conveys that this is a 2d matrix and that you can ignore the 3d
> components.
>
> Maybe you misunderstood what I was implying.  You are describing an
> intended application of the matrix to 2d or 3d graphics.  The problem is
> that the is2D() method is applicable to what appears to be a generic
> object.  That object has a name “DOMMatrix” which implies a general
> capability that isn’t present.
>
> However, when someone says matrix [1], I think matrix.  My understanding
> of matrices extends beyond 4x4 and 2x3.  It’s understandable perhaps that
> the matrix object is 2-dimensional only, because that is highly useful for
> the application you have in mind, and a lot more besides.


The DOM prefix is present because we don't want to squat on "Matrix" and
various different DOM APIs need this object. The most general thing those
APIs need is a matrix representation of 3D projective transforms, so that's
what DOMMatrix currently provides. I find it hard to imagine needing to go
beyond that; I cannot forsee Web APIs needing to interface with a general
linear algebra package. If they do, extending DOMMatrix and creating an
entirely new type (GeneralMatrix?) are both viable options. And keep in
mind that in Web development the name of an interface type rarely shows up
in application code (generally just constructors and instanceof).

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to