Skip to content

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[geometry] DOMPointReadonly matrixTransform() is poorly specified #183

Closed
opened this issue Jun 3, 2017 · 4 comments
Closed

[geometry] DOMPointReadonly matrixTransform() is poorly specified#183

opened this issue Jun 3, 2017 · 4 comments
Assignees
Labels

Comments

smfr commented Jun 3, 2017 • edited

 https://drafts.fxtf.org/geometry/#dom-dompointreadonly-matrixtransform Step 3 says "Post-multiply point with matrixObject." but what does that mean exactly? Specifically, it's unclear how to handle the w value. Does it mean just initialize a matrix with the x, y, z, w values as: `[1 0 0 x]` `[0 1 0 y]` `[0 0 1 z]` `[0 0 w 1]` and then post-multiply that with 'matrix'?
added the label Jun 3, 2017

dirkschulze commented Jun 4, 2017

 @smfr Initially we just had x, y, z and it was a simple vector multiplied with a matrix (4th value or the vector beeing 1). With the perspective value I agree that this should be changed as you suggest. Then we would probably also need a way to get from the matrix back to the 4 value Point.

zcorpan commented Jun 7, 2017 • edited

 I believe it's implemented in chromium as a column vector ``````x y z w `````` (except I think there's a bug in the "2d" code path) What you suggest gives a different result.
added a commit that referenced this issue Jun 7, 2017
``` [geometry] Define better how to transform a point with a matrix ```
``` c275e14 ```
`Fixes #183.`
added a commit that referenced this issue Jun 7, 2017
``` [geometry] Define better how to transform a point with a matrix ```
``` 09d455d ```
`Fixes #183.`
added a commit that referenced this issue Jun 7, 2017
``` [geometry] Define better how to transform a point with a matrix ```
``` dac5e9d ```
`Fixes #183.`
added a commit that referenced this issue Jun 7, 2017
``` [geometry] Define better how to transform a point with a matrix ```
``` 2fd0153 ```
`Fixes #183.`
mentioned this issue Jun 7, 2017
added the label Jun 7, 2017

dirkschulze commented Jun 7, 2017

 @zcorpan That means that `w` would correspond to m44. I need to check it but are you sure that this is correct?

zcorpan commented Jun 13, 2017

 It's how it's implemented in Chromium, and how it's tested in web-platform-tests, as far as I can tell.
closed this in #187 Jun 21, 2017
added a commit that referenced this issue Jun 21, 2017
``` [geometry] Define better how to transform a point with a matrix ```
``` 6d2cc04 ```
`Fixes #183.`
to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.