Re: Intent to implement: DOMMatrix

2014-06-08 Thread Rik Cabanier
On Sat, Jun 7, 2014 at 9:38 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-07 12:49 GMT-04:00 L. David Baron 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

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Dirk Schulze
On Jun 8, 2014, at 6:38 AM, Benoit Jacob jacob.benoi...@gmail.com 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

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 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 way:

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Benoit Jacob
2014-06-08 8:56 GMT-04:00 fb.01...@gmail.com: 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

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 dba...@dbaron.org 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.

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,

Re: Intent to implement: DOMMatrix

2014-06-08 Thread Rik Cabanier
On Sun, Jun 8, 2014 at 8:13 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-08 8:56 GMT-04:00 fb.01...@gmail.com: 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

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-07 Thread Benoit Jacob
2014-06-07 12:49 GMT-04:00 L. David Baron 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 isIdentity is going to be used primarily for optimization. But we want

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 9:58 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 6, 2014, at 6:52 AM, Rik Cabanier caban...@gmail.com wrote: On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 6, 2014, at 6:27 AM, Robert O'Callahan rob...@ocallahan.org

Re: Intent to implement: DOMMatrix

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

Re: Intent to implement: DOMMatrix

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

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 8:57 AM, Milan Sreckovic msrecko...@mozilla.com wrote: On Jun 5, 2014, at 18:34 , Rik Cabanier caban...@gmail.com wrote: On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier caban...@gmail.com

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 6:12 PM, Rik Cabanier caban...@gmail.com wrote: On Fri, Jun 6, 2014 at 8:57 AM, Milan Sreckovic msrecko...@mozilla.com wrote: On Jun 5, 2014, at 18:34 , Rik Cabanier caban...@gmail.com wrote: On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan rob...@ocallahan.org

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

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 12:18 PM, Kip Gilbert kgilb...@mozilla.com 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

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 10:23 PM, Rik Cabanier caban...@gmail.com wrote: On Fri, Jun 6, 2014 at 12:18 PM, Kip Gilbert kgilb...@mozilla.com 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

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 kgilb...@mozilla.com mailto:kgilb...@mozilla.com wrote: Hello, From a game programmer's perspective, isIdentity would normally be used to cull out work. In these cases, it is expected

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

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 1:52 PM, Kip Gilbert kgilb...@mozilla.com wrote: On 2014-06-06, 1:23 PM, Rik Cabanier wrote: On Fri, Jun 6, 2014 at 12:18 PM, Kip Gilbert kgilb...@mozilla.com mailto:kgilb...@mozilla.com wrote: Hello, From a game programmer's perspective, isIdentity

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 2:10 PM, Neil n...@parkwaycc.co.uk 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

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 11:10 PM, Neil n...@parkwaycc.co.uk 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

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 11:22 PM, Rik Cabanier caban...@gmail.com 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:

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Rik Cabanier
On Fri, Jun 6, 2014 at 2:34 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 6, 2014, at 11:22 PM, Rik Cabanier caban...@gmail.com 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

Re: Intent to implement: DOMMatrix

2014-06-06 Thread Dirk Schulze
On Jun 6, 2014, at 11:38 PM, Rik Cabanier caban...@gmail.com wrote: On Fri, Jun 6, 2014 at 2:34 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 6, 2014, at 11:22 PM, Rik Cabanier caban...@gmail.com wrote: The issue is not that isIdentity() is confusing. The problem is that you

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Wed, Jun 4, 2014 at 5:47 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-04 20:28 GMT-04:00 Cameron McCormack c...@mcc.id.au: 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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic msrecko...@mozilla.com 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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Benoit Jacob
2014-06-05 2:48 GMT-04:00 Rik Cabanier caban...@gmail.com: On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic msrecko...@mozilla.com 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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 5:05 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-05 2:48 GMT-04:00 Rik Cabanier caban...@gmail.com: On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic msrecko...@mozilla.com wrote: In general, is “this is how it worked with SVGMatrix” one of the design

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Benoit Jacob
2014-06-05 9:08 GMT-04:00 Rik Cabanier caban...@gmail.com: On Thu, Jun 5, 2014 at 5:05 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-05 2:48 GMT-04:00 Rik Cabanier caban...@gmail.com: On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic msrecko...@mozilla.com wrote: In

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 7:08 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-05 9:08 GMT-04:00 Rik Cabanier caban...@gmail.com: On Thu, Jun 5, 2014 at 5:05 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-05 2:48 GMT-04:00 Rik Cabanier caban...@gmail.com: On

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Wed, Jun 4, 2014 at 12:21 AM, Dirk Schulze dschu...@adobe.com wrote: On Jun 4, 2014, at 12:42 AM, Rik Cabanier caban...@gmail.com wrote: On Tue, Jun 3, 2014 at 3:29 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier caban...@gmail.com

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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 5, 2014, at 11:07 PM, Rik Cabanier caban...@gmail.com 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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 2:14 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 5, 2014, at 11:07 PM, Rik Cabanier caban...@gmail.com 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()

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 5, 2014, at 11:52 PM, Rik Cabanier caban...@gmail.com wrote: On Thu, Jun 5, 2014 at 2:14 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 5, 2014, at 11:07 PM, Rik Cabanier caban...@gmail.com wrote: It seems like we're getting to agreement. (Please tell me if I'm wrong

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier caban...@gmail.com 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();

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 9:57 AM, Dirk Schulze dschu...@adobe.com 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.rt sS?o Whhei

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 10:28 AM, Robert O'Callahan rob...@ocallahan.org wrote: On Fri, Jun 6, 2014 at 9:57 AM, Dirk Schulze dschu...@adobe.com wrote: :) would be short enough I guess. But doesn’t sound serious enough. translateSelf? Or translateThis of course. Rob -- Jtehsauts tshaei

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier caban...@gmail.com 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

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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Benoit Jacob
2014-06-05 18:59 GMT-04:00 Matt Woodrow mwood...@mozilla.com: 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

Re: Intent to implement: DOMMatrix

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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Robert O'Callahan
On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze dschu...@adobe.com 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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 6, 2014, at 6:27 AM, Robert O'Callahan rob...@ocallahan.org wrote: On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze dschu...@adobe.com 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

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Rik Cabanier
On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 6, 2014, at 6:27 AM, Robert O'Callahan rob...@ocallahan.org wrote: On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze dschu...@adobe.com wrote: What about DOMMatrix(1,0,0,1,0,0) or

Re: Intent to implement: DOMMatrix

2014-06-05 Thread Dirk Schulze
On Jun 6, 2014, at 6:52 AM, Rik Cabanier caban...@gmail.com wrote: On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze dschu...@adobe.com wrote: On Jun 6, 2014, at 6:27 AM, Robert O'Callahan rob...@ocallahan.org wrote: On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze dschu...@adobe.com wrote:

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Dirk Schulze
On Jun 4, 2014, at 12:42 AM, Rik Cabanier caban...@gmail.com wrote: On Tue, Jun 3, 2014 at 3:29 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier caban...@gmail.com wrote: That would require try/catch around all the invert() calls. This is

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 Till Schneidereit
On Wed, Jun 4, 2014 at 1:17 AM, Rik Cabanier caban...@gmail.com 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 caban...@gmail.com wrote: Actually, inverse() is already spec'd to throw if the

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

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

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Benoit Jacob
2014-06-04 20:28 GMT-04:00 Cameron McCormack c...@mcc.id.au: 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

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Dirk Schulze
On Jun 5, 2014, at 2:28 AM, Cameron McCormack c...@mcc.id.au 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

Re: Intent to implement: DOMMatrix

2014-06-04 Thread Dirk Schulze
On Jun 5, 2014, at 2:47 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-04 20:28 GMT-04:00 Cameron McCormack c...@mcc.id.au: 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

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Dirk Schulze
On Jun 2, 2014, at 12:11 AM, Benoit Jacob jacob.benoi...@gmail.com 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

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

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-02 23:45 GMT-04:00 Rik Cabanier caban...@gmail.com: 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. -

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 6:13 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-02 23:45 GMT-04:00 Rik Cabanier caban...@gmail.com: 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

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 3:34 GMT-04:00 Dirk Schulze dschu...@adobe.com: On Jun 2, 2014, at 12:11 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: Objection #6: The determinant() method, being in this API the only easy

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

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 3:34 GMT-04:00 Dirk Schulze dschu...@adobe.com: On Jun 2, 2014, at 12:11 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: Objection #6: The determinant() method, being in this API the only easy

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 16:20 GMT-04:00 Rik Cabanier caban...@gmail.com: On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 3:34 GMT-04:00 Dirk Schulze dschu...@adobe.com: On Jun 2, 2014, at 12:11 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: Objection

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 17:34 GMT-04:00 Benoit Jacob jacob.benoi...@gmail.com: 2014-06-03 16:20 GMT-04:00 Rik Cabanier caban...@gmail.com: On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 3:34 GMT-04:00 Dirk Schulze dschu...@adobe.com: On Jun 2, 2014,

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 2:34 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 16:20 GMT-04:00 Rik Cabanier caban...@gmail.com: On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 3:34 GMT-04:00 Dirk Schulze dschu...@adobe.com: On Jun

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Robert O'Callahan
On Wed, Jun 4, 2014 at 1:13 AM, Benoit Jacob jacob.benoi...@gmail.com 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

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 2:40 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 17:34 GMT-04:00 Benoit Jacob jacob.benoi...@gmail.com: 2014-06-03 16:20 GMT-04:00 Rik Cabanier caban...@gmail.com: On Tue, Jun 3, 2014 at 6:06 AM, Benoit Jacob jacob.benoi...@gmail.com wrote:

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 18:26 GMT-04:00 Rik Cabanier caban...@gmail.com: On Tue, Jun 3, 2014 at 2:40 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-03 17:34 GMT-04:00 Benoit Jacob jacob.benoi...@gmail.com: 2014-06-03 16:20 GMT-04:00 Rik Cabanier caban...@gmail.com: On Tue, Jun 3,

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Robert O'Callahan
On Wed, Jun 4, 2014 at 10:23 AM, Robert O'Callahan rob...@ocallahan.org wrote: On Wed, Jun 4, 2014 at 1:13 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: This list misses some of the points that I care more about: - Should DOMMatrix really try to be both 3D projective transformations and

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Benoit Jacob
2014-06-03 18:29 GMT-04:00 Robert O'Callahan rob...@ocallahan.org: On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier caban...@gmail.com 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

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
On Tue, Jun 3, 2014 at 3:29 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Wed, Jun 4, 2014 at 10:26 AM, Rik Cabanier caban...@gmail.com wrote: That would require try/catch around all the invert() calls. This is ugly but more importantly, it will significantly slow down javascript

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Till Schneidereit
On Wed, Jun 4, 2014 at 12:26 AM, Rik Cabanier caban...@gmail.com 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

Re: Intent to implement: DOMMatrix

2014-06-03 Thread Rik Cabanier
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 caban...@gmail.com 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

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Benoit Jacob
2014-06-01 23:19 GMT-04:00 Rik Cabanier caban...@gmail.com: On Sun, Jun 1, 2014 at 3:11 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-05-31 0:40 GMT-04:00 Rik Cabanier caban...@gmail.com: Objection #3: I dislike the way that this API exposes multiplication order. It's not

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Robert O'Callahan
On Mon, Jun 2, 2014 at 3:19 PM, Rik Cabanier caban...@gmail.com 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 do the same here? One option

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Martin Thomson
On 2014-05-30, at 21:00, Benoit Jacob jacob.benoi...@gmail.com 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 looking at only the IDL, admittedly, is2D() ===

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 8:04 AM, Martin Thomson m...@mozilla.com wrote: On 2014-05-30, at 21:00, Benoit Jacob jacob.benoi...@gmail.com wrote: 2x3 matrices representing affine 2D transformations; this mode switch corresponds to the is2D() getter Am I the only one that finds this 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 caban...@gmail.com 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 Martin Thomson
On 2014-06-02, at 08:53, Rik Cabanier caban...@gmail.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

Re: Intent to implement: DOMMatrix

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

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Benoit Jacob
2014-06-02 14:06 GMT-04:00 Benoit Jacob jacob.benoi...@gmail.com: 2014-06-02 13:56 GMT-04:00 Nick Alexander nalexan...@mozilla.com: On 2014-06-02, 9:59 AM, Rik Cabanier wrote: On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander nalexan...@mozilla.com mailto:nalexan...@mozilla.com wrote:

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Benoit Jacob
2014-06-02 13:56 GMT-04:00 Nick Alexander nalexan...@mozilla.com: On 2014-06-02, 9:59 AM, Rik Cabanier wrote: On Mon, Jun 2, 2014 at 9:05 AM, Nick Alexander nalexan...@mozilla.com mailto:nalexan...@mozilla.com wrote: On 2014-06-02, 4:59 AM, Robert O'Callahan wrote: On Mon,

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 11:08 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-02 14:06 GMT-04:00 Benoit Jacob jacob.benoi...@gmail.com: 2014-06-02 13:56 GMT-04:00 Nick Alexander nalexan...@mozilla.com: On 2014-06-02, 9:59 AM, Rik Cabanier wrote: On Mon, Jun 2, 2014 at 9:05

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Robert O'Callahan
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

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Benoit Jacob
2014-06-02 17:13 GMT-04:00 Rik Cabanier caban...@gmail.com: On Mon, Jun 2, 2014 at 11:08 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-02 14:06 GMT-04:00 Benoit Jacob jacob.benoi...@gmail.com: 2014-06-02 13:56 GMT-04:00 Nick Alexander nalexan...@mozilla.com: On

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 3:03 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-02 17:13 GMT-04:00 Rik Cabanier caban...@gmail.com: On Mon, Jun 2, 2014 at 11:08 AM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-06-02 14:06 GMT-04:00 Benoit Jacob jacob.benoi...@gmail.com:

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 7:07 PM, Robert O'Callahan rob...@ocallahan.org 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

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

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

Re: Intent to implement: DOMMatrix

2014-06-02 Thread Rik Cabanier
On Mon, Jun 2, 2014 at 8:32 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Tue, Jun 3, 2014 at 3:28 PM, Rik Cabanier caban...@gmail.com 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

Re: Intent to implement: DOMMatrix

2014-06-01 Thread Rik Cabanier
On Sun, Jun 1, 2014 at 3:11 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: 2014-05-31 0:40 GMT-04:00 Rik Cabanier caban...@gmail.com: Objection #3: I dislike the way that this API exposes multiplication order. It's not obvious enough which of A.multiply(B) and A.multiplyBy(B) is doing

Re: Intent to implement: DOMMatrix

2014-05-31 Thread Anne van Kesteren
On Sat, May 31, 2014 at 6:40 AM, Rik Cabanier caban...@gmail.com wrote: We already went over this at length about a year ago. It does seem useful to note some of the lessons you learned in the specification. E.g. that skew() is largely misplaced, but that it's there for compatibility. And what

Intent to implement: DOMMatrix

2014-05-30 Thread Rik Cabanier
Primary eng emails caban...@adobe.com, dschu...@adobe.com *Proposal* *http://dev.w3.org/fxtf/geometry/#DOMMatrix http://dev.w3.org/fxtf/geometry/#DOMMatrix* *Summary* Expose new global objects named 'DOMMatrix' and 'DOMMatrixReadOnly' that offer a matrix abstraction. *Motivation* The DOMMatrix

Re: Intent to implement: DOMMatrix

2014-05-30 Thread Jonas Sicking
I'll defer to the layout folks for this one. / Jonas On Fri, May 30, 2014 at 5:02 PM, Rik Cabanier caban...@gmail.com wrote: Primary eng emails caban...@adobe.com, dschu...@adobe.com *Proposal* *http://dev.w3.org/fxtf/geometry/#DOMMatrix http://dev.w3.org/fxtf/geometry/#DOMMatrix*

Re: Intent to implement: DOMMatrix

2014-05-30 Thread Robert O'Callahan
I'm all for it! :-) Rob -- Jtehsauts tshaei dS,o n Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.rt 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

Re: Intent to implement: DOMMatrix

2014-05-30 Thread Benoit Jacob
I never seem to be able to discourage people from dragging the W3C into specialist topics that are outside its area of expertise. Let me try again. Objection #1: The skew* methods are out of place there, because, contrary to the rest, they are not geometric transformations, they are just

Re: Intent to implement: DOMMatrix

2014-05-30 Thread Rik Cabanier
Since DOMMatrix is replacing SVGMatrix, I don't see a way to implement it behind a flag. Should I wait to make that change and leave both SVGMatrix and DOMMatrix in the code for now? On Fri, May 30, 2014 at 8:53 PM, Robert O'Callahan rob...@ocallahan.org wrote: I'm all for it! :-) Rob --

Re: Intent to implement: DOMMatrix

2014-05-30 Thread Rik Cabanier
On Fri, May 30, 2014 at 9:00 PM, Benoit Jacob jacob.benoi...@gmail.com wrote: I never seem to be able to discourage people from dragging the W3C into specialist topics that are outside its area of expertise. Let me try again. Objection #1: The skew* methods are out of place there, because,

  1   2   >