Re: Intent to implement: DOMMatrix

2014-06-08 Thread Rik Cabanier
On Sun, Jun 8, 2014 at 8:13 AM, Benoit Jacob wrote: > 2014-06-08 8:56 GMT-04:00 : > > > On Monday, June 2, 2014 12:11:29 AM UTC+2, Benoit Jacob wrote: > > > My ROI for arguing on standards mailing on matrix math topics lists has > > > been very low, presumably because these are specialist topics

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Nick Alexander
On 2014-06-08, 2:44 AM, Neil wrote: Benoit Jacob wrote: Strawman class diagram: Transformation / | \ / | \ /|\ / | \ Identity MatrixOther transform types e.g. Translation In such a world, the

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Nick Alexander
On 2014-06-07, 9:38 PM, Benoit Jacob wrote: 2014-06-07 12:49 GMT-04:00 L. David Baron mailto:dba...@dbaron.org>>: On Monday 2014-06-02 20:45 -0700, Rik Cabanier wrote: > - change isIdentity() so it's a flag. I'm a little worried about this one at first glance. I suspect isI

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Benoit Jacob
2014-06-08 8:56 GMT-04:00 : > On Monday, June 2, 2014 12:11:29 AM UTC+2, Benoit Jacob wrote: > > My ROI for arguing on standards mailing on matrix math topics lists has > > been very low, presumably because these are specialist topics outside of > > the area of expertise of these groups. > > > > H

Re: Intent to implement: DOMMatrix

2014-06-08 Thread fb . 01 . 90
On Monday, June 2, 2014 12:11:29 AM UTC+2, Benoit Jacob wrote: > My ROI for arguing on standards mailing on matrix math topics lists has > been very low, presumably because these are specialist topics outside of > the area of expertise of these groups. > > Here are a couple more objections by the

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Neil
Benoit Jacob wrote: Strawman class diagram: Transformation / | \ / | \ /|\ / | \ Identity MatrixOther transform types e.g. Translation In such a world, the class containing the word "Matrix"

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Dirk Schulze
On Jun 8, 2014, at 6:38 AM, Benoit Jacob wrote: > Note that the current way that isIdentity() works also fails to offer that > characteristic, outside of accidental cases, due to how floating point > works. DOMMatrix focuses on CSS, SVG and HTML which are not limited to value range of -1 to 1

Re: Intent to implement: DOMMatrix

2014-06-07 Thread Rik Cabanier
On Sat, Jun 7, 2014 at 9:38 PM, Benoit Jacob wrote: > > > > 2014-06-07 12:49 GMT-04:00 L. David Baron : > > On Monday 2014-06-02 20:45 -0700, Rik Cabanier wrote: >> > - change isIdentity() so it's a flag. >> >> I'm a little worried about this one at first glance. >> >> I suspect isIdentity is goi

Re: Intent to implement: DOMMatrix

2014-06-07 Thread Benoit Jacob
2014-06-07 12:49 GMT-04:00 L. David Baron : > On Monday 2014-06-02 20:45 -0700, Rik Cabanier wrote: > > - change isIdentity() so it's a flag. > > I'm a little worried about this one at first glance. > > I suspect isIdentity is going to be used primarily for optimization. > But we want optimization

Re: Intent to implement: DOMMatrix

2014-06-07 Thread L. David Baron
On Monday 2014-06-02 20:45 -0700, Rik Cabanier wrote: > - change isIdentity() so it's a flag. I'm a little worried about this one at first glance. I suspect isIdentity is going to be used primarily for optimization. But we want optimizations on the Web to be good -- we should care about making it

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 11:38 PM, Rik Cabanier wrote: > > > > On Fri, Jun 6, 2014 at 2:34 PM, Dirk Schulze wrote: > > On Jun 6, 2014, at 11:22 PM, Rik Cabanier wrote: > > > > > The issue is not that "isIdentity()" is confusing. The problem is that you > > shouldn't make decisions based on it.

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 2:34 PM, Dirk Schulze wrote: > > On Jun 6, 2014, at 11:22 PM, Rik Cabanier wrote: > > > > > The issue is not that "isIdentity()" is confusing. The problem is that > you > > shouldn't make decisions based on it. From earlier in the thread: > > > > The isIdentity() method ha

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 11:22 PM, Rik Cabanier wrote: > > The issue is not that "isIdentity()" is confusing. The problem is that you > shouldn't make decisions based on it. From earlier in the thread: > > The isIdentity() method has the same issue as was described about is2D() > above: as matrices

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 11:10 PM, Neil wrote: > Rik Cabanier wrote: > >> 1. isIdentity() >> We settled that this should mean that the matrix was never changed to a non >> identity state. >> > Are you doing something similar for the 2d/3d case? This is already in the specification[1]. As Rik menti

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 2:10 PM, Neil wrote: > Rik Cabanier wrote: > > 1. isIdentity() >> We settled that this should mean that the matrix was never changed to a >> non identity state. >> >> Are you doing something similar for the 2d/3d case? Yes, once a matrix becomes 3d, it will always be a

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 1:52 PM, Kip Gilbert wrote: > > On 2014-06-06, 1:23 PM, Rik Cabanier wrote: > > >> >> >> On Fri, Jun 6, 2014 at 12:18 PM, Kip Gilbert > > wrote: >> >> Hello, >> >> From a game programmer's perspective, isIdentity would normally be >>

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Neil
Rik Cabanier wrote: 1. isIdentity() We settled that this should mean that the matrix was never changed to a non identity state. Are you doing something similar for the 2d/3d case? -- Warning: May contain traces of nuts. ___ dev-platform mailing lis

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Kip Gilbert
On 2014-06-06, 1:23 PM, Rik Cabanier wrote: On Fri, Jun 6, 2014 at 12:18 PM, Kip Gilbert > wrote: Hello, From a game programmer's perspective, isIdentity would normally be used to cull out work. In these cases, it is expected that isIdentity wi

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 10:23 PM, Rik Cabanier wrote: > On Fri, Jun 6, 2014 at 12:18 PM, Kip Gilbert wrote: > >> Hello, >> >> From a game programmer's perspective, isIdentity would normally be used to >> cull out work. In these cases, it is expected that isIdentity will return >> true only when t

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 12:18 PM, Kip Gilbert wrote: > Hello, > > From a game programmer's perspective, isIdentity would normally be used to > cull out work. In these cases, it is expected that isIdentity will return > true only when the matrix is exactly equal to the identity matrix. Due to > t

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Kip Gilbert
Hello, From a game programmer's perspective, isIdentity would normally be used to cull out work. In these cases, it is expected that isIdentity will return true only when the matrix is exactly equal to the identity matrix. Due to the nature of floating point, the isIdentity will only likely

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 6:12 PM, Rik Cabanier wrote: > > > > On Fri, Jun 6, 2014 at 8:57 AM, Milan Sreckovic > wrote: > On Jun 5, 2014, at 18:34 , Rik Cabanier wrote: > >> On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan >> wrote: >> >>> On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier wrote:

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 8:57 AM, Milan Sreckovic wrote: > On Jun 5, 2014, at 18:34 , Rik Cabanier wrote: > > On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan > wrote: > > On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier wrote: > > ... > > > > Then there's this case: > var m = new DOMMatrix(); > m.

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Milan Sreckovic
On Jun 5, 2014, at 18:34 , Rik Cabanier wrote: > On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan > wrote: > >> On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier wrote: >> >>> ... > > >> Then there's this case: >> var m = new DOMMatrix(); >> m.translate(-1,-1); >> m.translate(1,1); >> m.isIdent

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 6, 2014, at 8:00 AM, "Rik Cabanier" mailto:caban...@gmail.com>> wrote: On Thu, Jun 5, 2014 at 9:58 PM, Dirk Schulze mailto:dschu...@adobe.com>> wrote: On Jun 6, 2014, at 6:52 AM, Rik Cabanier mailto:caban...@gmail.com>> wrote: > > > > On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze >

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 9:58 PM, Dirk Schulze wrote: > > On Jun 6, 2014, at 6:52 AM, Rik Cabanier wrote: > > > > > > > > > On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze wrote: > > > > On Jun 6, 2014, at 6:27 AM, Robert O'Callahan > wrote: > > > > > On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze >

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 6, 2014, at 6:52 AM, Rik Cabanier wrote: > > > > On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze wrote: > > On Jun 6, 2014, at 6:27 AM, Robert O'Callahan wrote: > > > On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze wrote: > > What about > > > > DOMMatrix(1,0,0,1,0,0) or > >

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze wrote: > > On Jun 6, 2014, at 6:27 AM, Robert O'Callahan > wrote: > > > On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze wrote: > > What about > > > > DOMMatrix(1,0,0,1,0,0) or > > DOMMatrix(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1) > > > > Do we

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 6, 2014, at 6:27 AM, Robert O'Callahan wrote: > On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze wrote: > What about > > DOMMatrix(1,0,0,1,0,0) or > DOMMatrix(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1) > > Do we check the values and determine if the matrix is identity or not? If we

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze wrote: > What about > > DOMMatrix(1,0,0,1,0,0) or > DOMMatrix(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1) > > Do we check the values and determine if the matrix is identity or not? If > we do, then authors could write DOMMatrix(other.a, other.b, o

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 6, 2014, at 12:28 AM, Robert O'Callahan wrote: > On Fri, Jun 6, 2014 at 9:57 AM, Dirk Schulze wrote: > :) would be short enough I guess. But doesn’t sound serious enough. > > translateSelf? > > Rob > -- > Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le >

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Benoit Jacob
2014-06-05 18:59 GMT-04:00 Matt Woodrow : > On 6/06/14 12:05 am, Benoit Jacob wrote: > >> >> The situation isn't symmetric: radians are inherently simpler to implement >> (thus slightly faster), basically because only in radians is it true that >> sin(x) ~= x for small x. >> >> I also doubt that d

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Matt Woodrow
On 6/06/14 12:05 am, Benoit Jacob wrote: The situation isn't symmetric: radians are inherently simpler to implement (thus slightly faster), basically because only in radians is it true that sin(x) ~= x for small x. I also doubt that degrees are simpler to understand, and if anything you might j

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan wrote: > On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier wrote: > >> There are 2 things that I have questions about: >> 1. isIdentity() >> We settled that this should mean that the matrix was never changed to a >> non >> identity state. >> This mean

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 10:28 AM, Robert O'Callahan wrote: > On Fri, Jun 6, 2014 at 9:57 AM, Dirk Schulze wrote: > >> :) would be short enough I guess. But doesn’t sound serious enough. >> > > translateSelf? > Or translateThis of course. Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus e

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier wrote: > There are 2 things that I have questions about: > 1. isIdentity() > We settled that this should mean that the matrix was never changed to a non > identity state. > This means that the following code: > > var m = new DOMMatrix(); > > m.rotate(0

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 9:57 AM, Dirk Schulze wrote: > :) would be short enough I guess. But doesn’t sound serious enough. > translateSelf? 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 teo

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 5, 2014, at 11:52 PM, Rik Cabanier wrote: > > > > On Thu, Jun 5, 2014 at 2:14 PM, Dirk Schulze wrote: > > On Jun 5, 2014, at 11:07 PM, Rik Cabanier wrote: > > > It seems like we're getting to agreement. (Please tell me if I'm wrong > > about this) > > There are 2 things that I hav

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 2:14 PM, Dirk Schulze wrote: > > On Jun 5, 2014, at 11:07 PM, Rik Cabanier wrote: > > > It seems like we're getting to agreement. (Please tell me if I'm wrong > about this) > > There are 2 things that I have questions about: > > 1. isIdentity() > > We settled that this sho

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 5, 2014, at 11:07 PM, Rik Cabanier wrote: > It seems like we're getting to agreement. (Please tell me if I'm wrong about > this) > There are 2 things that I have questions about: > 1. isIdentity() > We settled that this should mean that the matrix was never changed to a non > identity

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
It seems like we're getting to agreement. (Please tell me if I'm wrong about this) There are 2 things that I have questions about: 1. isIdentity() We settled that this should mean that the matrix was never changed to a non identity state. This means that the following code: var m = new DOMMatrix()

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Wed, Jun 4, 2014 at 12:21 AM, Dirk Schulze wrote: > > On Jun 4, 2014, at 12:42 AM, Rik Cabanier wrote: > > > > > > > > > On Tue, Jun 3, 2014 at 3:29 PM, Robert O'Callahan > wrote: > > On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier > wrote: > > That would require try/catch around all the "inv

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 7:08 AM, Benoit Jacob wrote: > > > > 2014-06-05 9:08 GMT-04:00 Rik Cabanier : > > >> >> >> On Thu, Jun 5, 2014 at 5:05 AM, Benoit Jacob >> wrote: >> >>> >>> >>> >>> 2014-06-05 2:48 GMT-04:00 Rik Cabanier : >>> >>> On Wed, Jun 4, 2014 at 2:20 PM, Milan Srecko

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Benoit Jacob
2014-06-05 9:08 GMT-04:00 Rik Cabanier : > > > > On Thu, Jun 5, 2014 at 5:05 AM, Benoit Jacob > wrote: > >> >> >> >> 2014-06-05 2:48 GMT-04:00 Rik Cabanier : >> >> >>> >>> >>> On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic >>> wrote: >>> In general, is “this is how it worked with SVGMatrix

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 5:05 AM, Benoit Jacob wrote: > > > > 2014-06-05 2:48 GMT-04:00 Rik Cabanier : > > >> >> >> On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic >> wrote: >> >>> In general, is “this is how it worked with SVGMatrix” one of the design >>> principles? >>> >>> I was hoping this wou

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Benoit Jacob
2014-06-05 2:48 GMT-04:00 Rik Cabanier : > > > > On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic > wrote: > >> In general, is “this is how it worked with SVGMatrix” one of the design >> principles? >> >> I was hoping this would be the time matrix rotate() method goes to >> radians, like the canva

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Rik Cabanier
On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic wrote: > In general, is “this is how it worked with SVGMatrix” one of the design > principles? > > I was hoping this would be the time matrix rotate() method goes to > radians, like the canvas rotate, and unlike SVGMatrix version that takes > degree

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Rik Cabanier
On Wed, Jun 4, 2014 at 5:47 PM, Benoit Jacob wrote: > > > > 2014-06-04 20:28 GMT-04:00 Cameron McCormack : > > On 05/06/14 07:20, Milan Sreckovic wrote: >> >>> In general, is “this is how it worked with SVGMatrix” one of the >>> design principles? >>> >>> I was hoping this would be the time matri

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Dirk Schulze
On Jun 5, 2014, at 2:47 AM, Benoit Jacob wrote: > > > > 2014-06-04 20:28 GMT-04:00 Cameron McCormack : > On 05/06/14 07:20, Milan Sreckovic wrote: > In general, is “this is how it worked with SVGMatrix” one of the > design principles? > > I was hoping this would be the time matrix rotate() m

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Dirk Schulze
On Jun 5, 2014, at 2:28 AM, Cameron McCormack wrote: > On 05/06/14 07:20, Milan Sreckovic wrote: >> In general, is “this is how it worked with SVGMatrix” one of the >> design principles? >> >> I was hoping this would be the time matrix rotate() method goes to >> radians, like the canvas rotate,

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Benoit Jacob
2014-06-04 20:28 GMT-04:00 Cameron McCormack : > On 05/06/14 07:20, Milan Sreckovic wrote: > >> In general, is “this is how it worked with SVGMatrix” one of the >> design principles? >> >> I was hoping this would be the time matrix rotate() method goes to >> radians, like the canvas rotate, and un

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Cameron McCormack
On 05/06/14 07:20, Milan Sreckovic wrote: In general, is “this is how it worked with SVGMatrix” one of the design principles? I was hoping this would be the time matrix rotate() method goes to radians, like the canvas rotate, and unlike SVGMatrix version that takes degrees... By the way, in th

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Milan Sreckovic
In general, is “this is how it worked with SVGMatrix” one of the design principles? I was hoping this would be the time matrix rotate() method goes to radians, like the canvas rotate, and unlike SVGMatrix version that takes degrees... -- - Milan On Jun 3, 2014, at 18:26 , Rik Cabanier wrote:

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Till Schneidereit
On Wed, Jun 4, 2014 at 1:17 AM, Rik Cabanier wrote: > > > > On Tue, Jun 3, 2014 at 3:48 PM, Till Schneidereit < > t...@tillschneidereit.net> wrote: > >> On Wed, Jun 4, 2014 at 12:26 AM, Rik Cabanier wrote: >> >>> > Actually, inverse() is already spec'd to throw if the inversion fails. >>> In >>>

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Neil
Dirk Schulze wrote: There was an argument that: if (matrix.isInvertible()) matrix.invert(); would force UAs to compute the determinant twice. Actually, UAs can be very smart about that. The determinant is a simple double. It can be stored and invalidated as needed internally. (If it

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Dirk Schulze
On Jun 4, 2014, at 12:42 AM, Rik Cabanier wrote: > > > > On Tue, Jun 3, 2014 at 3:29 PM, Robert O'Callahan > wrote: > On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier wrote: > That would require try/catch around all the "invert()" calls. This is ugly > but more importantly, it will significan

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 3:48 PM, Till Schneidereit wrote: > On Wed, Jun 4, 2014 at 12:26 AM, Rik Cabanier wrote: > >> > Actually, inverse() is already spec'd to throw if the inversion fails. >> In >> > that case (assuming we keep it that way) there is no need at all for any >> > isInvertible kind

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Till Schneidereit
On Wed, Jun 4, 2014 at 12:26 AM, Rik Cabanier wrote: > > Actually, inverse() is already spec'd to throw if the inversion fails. In > > that case (assuming we keep it that way) there is no need at all for any > > isInvertible kind of method. Note that in floating-point arithmetic there > > is no a

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Robert O'Callahan
On Wed, Jun 4, 2014 at 10:42 AM, Rik Cabanier wrote: > Going with Benoit's suggestion, we can change the idl for invert to: > > bool invert(); > > and change inverse to return a matrix with NaN for all its elements. > Make it so! Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehr

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 3:29 PM, Robert O'Callahan wrote: > On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier wrote: > >> That would require try/catch around all the "invert()" calls. This is ugly >> but more importantly, it will significantly slow down javascript >> execution. >> I'd prefer that we

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 18:29 GMT-04:00 Robert O'Callahan : > On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier wrote: > >> That would require try/catch around all the "invert()" calls. This is ugly >> but more importantly, it will significantly slow down javascript >> execution. >> I'd prefer that we don't throw

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Robert O'Callahan
On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier wrote: > That would require try/catch around all the "invert()" calls. This is ugly > but more importantly, it will significantly slow down javascript execution. > I'd prefer that we don't throw at all but we have to because SVGMatrix did. > Are you

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Robert O'Callahan
On Wed, Jun 4, 2014 at 10:23 AM, Robert O'Callahan wrote: > On Wed, Jun 4, 2014 at 1:13 AM, Benoit Jacob > wrote: > >> This list misses some of the points that I care more about: >> - Should DOMMatrix really try to be both 3D projective transformations >> and 2D affine transformations or should

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 18:26 GMT-04:00 Rik Cabanier : > > > > On Tue, Jun 3, 2014 at 2:40 PM, Benoit Jacob > wrote: > >> >> >> >> 2014-06-03 17:34 GMT-04:00 Benoit Jacob : >> >> >>> >>> >>> 2014-06-03 16:20 GMT-04:00 Rik Cabanier : >>> >>> On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob wro

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 2:40 PM, Benoit Jacob wrote: > > > > 2014-06-03 17:34 GMT-04:00 Benoit Jacob : > > >> >> >> 2014-06-03 16:20 GMT-04:00 Rik Cabanier : >> >> >>> >>> >>> On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob >>> wrote: >>> 2014-06-03 3:34 GMT-04:00 Dirk Schulze :

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Robert O'Callahan
On Wed, Jun 4, 2014 at 1:13 AM, Benoit Jacob wrote: > This list misses some of the points that I care more about: > - Should DOMMatrix really try to be both 3D projective transformations > and 2D affine transformations or should that be split into separate classes? > I raised this issue too a w

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 2:34 PM, Benoit Jacob wrote: > > > > 2014-06-03 16:20 GMT-04:00 Rik Cabanier : > > >> >> >> On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob >> wrote: >> >>> >>> >>> >>> 2014-06-03 3:34 GMT-04:00 Dirk Schulze : >>> >>> On Jun 2, 2014, at 12:11 AM, Benoit Jacob wrote

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 17:34 GMT-04:00 Benoit Jacob : > > > > 2014-06-03 16:20 GMT-04:00 Rik Cabanier : > > >> >> >> On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob >> wrote: >> >>> >>> >>> >>> 2014-06-03 3:34 GMT-04:00 Dirk Schulze : >>> >>> On Jun 2, 2014, at 12:11 AM, Benoit Jacob wrote:

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 16:20 GMT-04:00 Rik Cabanier : > > > > On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob > wrote: > >> >> >> >> 2014-06-03 3:34 GMT-04:00 Dirk Schulze : >> >> >>> On Jun 2, 2014, at 12:11 AM, Benoit Jacob >>> wrote: >>> >>> > Objection #6: >>> > >>> > The determinant() method, being in thi

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob wrote: > > > > 2014-06-03 3:34 GMT-04:00 Dirk Schulze : > > >> On Jun 2, 2014, at 12:11 AM, Benoit Jacob >> wrote: >> >> > Objection #6: >> > >> > The determinant() method, being in this API the only easy way to get >> > something that looks roughly l

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 12:52 PM, Benoit Jacob wrote: > I also think that now that determinant() is being removed, is a good time > to revisit my Objection #4 which I don't think has been addressed at all: > please remove inverse() too. > > Indeed, without its companion determinant() method, the i

Re: Intent to implement: DOMMatrix

2014-06-03 Thread K. Gadd
Inverses get used *a lot*. I would argue that they are only 'advanced' in that there are many lines of code in an implementation - they are a common operation when setting up transforms or working with transforms. For example, reverse-projecting from an onscreen point into a point on the surface of

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
I also think that now that determinant() is being removed, is a good time to revisit my Objection #4 which I don't think has been addressed at all: please remove inverse() too. Indeed, without its companion determinant() method, the inverse() method is now standing out as by far the most advanced

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob wrote: > > > > 2014-06-03 3:34 GMT-04:00 Dirk Schulze : > > >> On Jun 2, 2014, at 12:11 AM, Benoit Jacob >> wrote: >> >> > Objection #6: >> > >> > The determinant() method, being in this API the only easy way to get >> > something that looks roughly l

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 6:13 AM, Benoit Jacob wrote: > > > > 2014-06-02 23:45 GMT-04:00 Rik Cabanier : > > To recap I think the following points have been resolved: >> - remove determinant (unless someone comes up with a strong use case) >> - change is2D() so it's a flag instead of calculated on t

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-02 23:45 GMT-04:00 Rik Cabanier : > To recap I think the following points have been resolved: > - remove determinant (unless someone comes up with a strong use case) > - change is2D() so it's a flag instead of calculated on the fly > - change isIdentity() so it's a flag. > - update constru

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 3:34 GMT-04:00 Dirk Schulze : > > On Jun 2, 2014, at 12:11 AM, Benoit Jacob > wrote: > > > Objection #6: > > > > The determinant() method, being in this API the only easy way to get > > something that looks roughly like a measure of invertibility, will > probably > > be (mis-)used as a

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Neil
Rik Cabanier wrote: Still up for discussion: - rename isIdentity My understanding is that you want to use isIdentity/is2D as an optimisation for known classes of matrix, and what you're really interested in is if the matrix has had any 2D or 3D transforms applied to it, even if those transfo

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Dirk Schulze
On Jun 2, 2014, at 12:11 AM, Benoit Jacob wrote: > Objection #6: > > The determinant() method, being in this API the only easy way to get > something that looks roughly like a measure of invertibility, will probably > be (mis-)used as a measure of invertibility. So I'm quite confident that it >

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 8:32 PM, Robert O'Callahan wrote: > On Tue, Jun 3, 2014 at 3:28 PM, Rik Cabanier wrote: > >> Yes, isIdentity is used as an indication that nothing needs to be done or >> that the transform hasn't changed. >> Maybe we should rename it to isDefault, isInitial or isNoOp? >> >

Re: Intent to implement: DOMMatrix

2014-06-02 Thread K. Gadd
Minor spec suggestion: This looks like a great primitive, but having to create GC pressure to multiply values by the matrix seems like a real mistake. transformPoint should have an overload that accepts a Float64Array and mutates it in-place, or maybe a 'in, out' pair of arrays. Probably also accep

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
To recap I think the following points have been resolved: - remove determinant (unless someone comes up with a strong use case) - change is2D() so it's a flag instead of calculated on the fly - change isIdentity() so it's a flag. - update constructors so they set/copy the flags appropriately Still

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Robert O'Callahan
On Tue, Jun 3, 2014 at 3:28 PM, Rik Cabanier wrote: > Yes, isIdentity is used as an indication that nothing needs to be done or > that the transform hasn't changed. > Maybe we should rename it to isDefault, isInitial or isNoOp? > I think isIdentity is the right name. Glancing through Gecko I se

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 7:07 PM, Robert O'Callahan wrote: > Off the top of my head, the places in Gecko I know of that use isIdentity > or is2D fall into two categories: > 1) math performance optimizations > 2) (is2D only) we're going to take an implementation approach that only > works for 2D aff

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Robert O'Callahan
Off the top of my head, the places in Gecko I know of that use isIdentity or is2D fall into two categories: 1) math performance optimizations 2) (is2D only) we're going to take an implementation approach that only works for 2D affine transforms, and either a) there is no support for 3D perspective

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 3:03 PM, Benoit Jacob wrote: > > > > 2014-06-02 17:13 GMT-04:00 Rik Cabanier : > > >> >> >> On Mon, Jun 2, 2014 at 11:08 AM, Benoit Jacob >> wrote: >> >>> >>> >>> >>> 2014-06-02 14:06 GMT-04:00 Benoit Jacob : >>> >>> 2014-06-02 13:56 GMT-04:00 Nick Alexander

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Benoit Jacob
2014-06-02 17:13 GMT-04:00 Rik Cabanier : > > > > On Mon, Jun 2, 2014 at 11:08 AM, Benoit Jacob > wrote: > >> >> >> >> 2014-06-02 14:06 GMT-04:00 Benoit Jacob : >> >> >>> >>> >>> 2014-06-02 13:56 GMT-04:00 Nick Alexander : >>> >>> On 2014-06-02, 9:59 AM, Rik Cabanier wrote: > > >

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Robert O'Callahan
On Tue, Jun 3, 2014 at 4:24 AM, Martin Thomson 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

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 11:08 AM, Benoit Jacob wrote: > > > > 2014-06-02 14:06 GMT-04:00 Benoit Jacob : > > >> >> >> 2014-06-02 13:56 GMT-04:00 Nick Alexander : >> >> On 2014-06-02, 9:59 AM, Rik Cabanier wrote: >>> On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander >>>

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Benoit Jacob
2014-06-02 13:56 GMT-04:00 Nick Alexander : > On 2014-06-02, 9:59 AM, Rik Cabanier wrote: > >> >> >> >> On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander > > wrote: >> >> On 2014-06-02, 4:59 AM, Robert O'Callahan wrote: >> >> On Mon, Jun 2, 2014 at 3:19 PM,

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Benoit Jacob
2014-06-02 14:06 GMT-04:00 Benoit Jacob : > > > > 2014-06-02 13:56 GMT-04:00 Nick Alexander : > > On 2014-06-02, 9:59 AM, Rik Cabanier wrote: >> >>> >>> >>> >>> On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander >> > wrote: >>> >>> On 2014-06-02, 4:59 AM, Robert O'Ca

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 10:56 AM, Nick Alexander wrote: > On 2014-06-02, 9:59 AM, Rik Cabanier wrote: > >> >> >> >> On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander > > wrote: >> >> On 2014-06-02, 4:59 AM, Robert O'Callahan wrote: >> >> On Mon, Jun 2, 2014

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Nick Alexander
On 2014-06-02, 9:59 AM, Rik Cabanier wrote: On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander mailto:nalexan...@mozilla.com>> wrote: On 2014-06-02, 4:59 AM, Robert O'Callahan wrote: On Mon, Jun 2, 2014 at 3:19 PM, Rik Cabanier mailto:caban...@gmail.com>> wrote: isIdenti

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander wrote: > On 2014-06-02, 4:59 AM, Robert O'Callahan wrote: > >> On Mon, Jun 2, 2014 at 3:19 PM, Rik Cabanier wrote: >> >> isIdentity() indeed suffers from rounding errors but since it's useful, >>> I'm >>> hesitant to remove it. >>> In our rendering

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 9:24 AM, Martin Thomson wrote: > > On 2014-06-02, at 08:53, Rik Cabanier 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 matr

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Martin Thomson
On 2014-06-02, at 08:53, Rik Cabanier 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

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Nick Alexander
On 2014-06-02, 4:59 AM, Robert O'Callahan wrote: On Mon, Jun 2, 2014 at 3:19 PM, Rik Cabanier wrote: isIdentity() indeed suffers from rounding errors but since it's useful, I'm hesitant to remove it. In our rendering libraries at Adobe, we check if a matrix is *almost* identity. Maybe we can d

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 8:04 AM, Martin Thomson wrote: > On 2014-05-30, at 21:00, Benoit Jacob wrote: > > > 2x3 matrices > > representing affine 2D transformations; this mode switch corresponds to > the > > is2D() getter > > Am I the only one that finds this method entirely unintuitive? After >

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 4:59 AM, Robert O'Callahan wrote: > On Mon, Jun 2, 2014 at 3:19 PM, Rik Cabanier wrote: > >> isIdentity() indeed suffers from rounding errors but since it's useful, >> I'm >> hesitant to remove it. >> In our rendering libraries at Adobe, we check if a matrix is *almost* >>

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 4:57 AM, Benoit Jacob wrote: > > > > 2014-06-01 23:19 GMT-04:00 Rik Cabanier : > > >> >> >> On Sun, Jun 1, 2014 at 3:11 PM, Benoit Jacob >> wrote: >> >>> >>> >>> >>> 2014-05-31 0:40 GMT-04:00 Rik Cabanier : >>> >>> Objection #3: > > I dislike the way that this API

  1   2   >