-
Notifications
You must be signed in to change notification settings - Fork 48
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
Comments
@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. |
I believe it's implemented in chromium as a column vector
(except I think there's a bug in the "2d" code path) What you suggest gives a different result. |
@zcorpan That means that |
It's how it's implemented in Chromium, and how it's tested in web-platform-tests, as far as I can tell. |
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'?
The text was updated successfully, but these errors were encountered: