Skip to content
New issue

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
smfr opened this issue Jun 3, 2017 · 4 comments
Closed

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

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

Comments

@smfr
Copy link

@smfr smfr commented Jun 3, 2017

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'?

@smfr smfr added the geometry-1 label Jun 3, 2017
@dirkschulze

This comment has been minimized.

Copy link
Contributor

@dirkschulze 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

This comment has been minimized.

Copy link
Member

@zcorpan zcorpan commented Jun 7, 2017

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.

@dirkschulze

This comment has been minimized.

Copy link
Contributor

@dirkschulze 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

This comment has been minimized.

Copy link
Member

@zcorpan 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.

Sign up for free 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.