-
Notifications
You must be signed in to change notification settings - Fork 715
[css-transforms-2] Provide more information or a link for the interpolation on rotate property #4516
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
Comments
I agree that this should be clearer. It should probably also be more consistent with the rules for interpolating the It also needs to be clear about how to convert the result back to a computed value -- both for css-typed-om access to Also #897 is related. |
I previously adjusted the expectations for this test in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac . However, I believe these two expectations were incorrect both before and after that adjustment, and the behavior shown in both Chromium and Gecko is correct. (WebKit differs slightly by producing 'none' rather than '0deg'.) I think this is correct because we're interpolating between two transforms: (a) '1 2 3 360deg' (the result of an add) (b) '0 1 0 100deg' Since the normalized axes differ, this interpolation falls into the rules for interpolation of matrices, as described in https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions . (The rules for the 'rotate' property incorrectly say that SLERP is always used, but I think that should be fixed to match the rules for the rotate() function. Either way, however, this test expectation should be based on interpolation of matrices using SLERP.) Since the matrix for (a) is the identity matrix, and the progress of the interpolation is at 0, the result is the identity matrix, which should (although the spec should make this explicit) be represented as 0deg. This should be fixed in w3c/csswg-drafts#4516 . Bug: 1180834 Change-Id: I0a5e15535da56949fc88bdf48423b41d409fe290 Fixed: 1006239
The rules for interpolation of rotate3d() are basically what I'd expect to be used for both. I'd also note that those rules need to handle vectors that can't be normalized (probably by using the other vector). And I think the rule that |
I previously adjusted the expectations for this test in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac . However, I believe these two expectations were incorrect both before and after that adjustment, and the behavior shown in both Chromium and Gecko is correct. (WebKit differs slightly by producing 'none' rather than '0deg'.) I think this is correct because we're interpolating between two transforms: (a) '1 2 3 360deg' (the result of an add) (b) '0 1 0 100deg' Since the normalized axes differ, this interpolation falls into the rules for interpolation of matrices, as described in https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions . (The rules for the 'rotate' property incorrectly say that SLERP is always used, but I think that should be fixed to match the rules for the rotate() function. Either way, however, this test expectation should be based on interpolation of matrices using SLERP.) Since the matrix for (a) is the identity matrix, and the progress of the interpolation is at 0, the result is the identity matrix, which should (although the spec should make this explicit) be represented as 0deg. This should be fixed in w3c/csswg-drafts#4516 . Bug: 1180834 Change-Id: I0a5e15535da56949fc88bdf48423b41d409fe290 Fixed: 1006239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237448 Auto-Submit: David Baron <dbaron@chromium.org> Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#933958}
I previously adjusted the expectations for this test in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac . However, I believe these two expectations were incorrect both before and after that adjustment, and the behavior shown in both Chromium and Gecko is correct. (WebKit differs slightly by producing 'none' rather than '0deg'.) I think this is correct because we're interpolating between two transforms: (a) '1 2 3 360deg' (the result of an add) (b) '0 1 0 100deg' Since the normalized axes differ, this interpolation falls into the rules for interpolation of matrices, as described in https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions . (The rules for the 'rotate' property incorrectly say that SLERP is always used, but I think that should be fixed to match the rules for the rotate() function. Either way, however, this test expectation should be based on interpolation of matrices using SLERP.) Since the matrix for (a) is the identity matrix, and the progress of the interpolation is at 0, the result is the identity matrix, which should (although the spec should make this explicit) be represented as 0deg. This should be fixed in w3c/csswg-drafts#4516 . Bug: 1180834 Change-Id: I0a5e15535da56949fc88bdf48423b41d409fe290 Fixed: 1006239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237448 Auto-Submit: David Baron <dbaron@chromium.org> Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#933958}
I previously adjusted the expectations for this test in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac . However, I believe these two expectations were incorrect both before and after that adjustment, and the behavior shown in both Chromium and Gecko is correct. (WebKit differs slightly by producing 'none' rather than '0deg'.) I think this is correct because we're interpolating between two transforms: (a) '1 2 3 360deg' (the result of an add) (b) '0 1 0 100deg' Since the normalized axes differ, this interpolation falls into the rules for interpolation of matrices, as described in https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions . (The rules for the 'rotate' property incorrectly say that SLERP is always used, but I think that should be fixed to match the rules for the rotate() function. Either way, however, this test expectation should be based on interpolation of matrices using SLERP.) Since the matrix for (a) is the identity matrix, and the progress of the interpolation is at 0, the result is the identity matrix, which should (although the spec should make this explicit) be represented as 0deg. This should be fixed in w3c/csswg-drafts#4516 . Bug: 1180834 Change-Id: I0a5e15535da56949fc88bdf48423b41d409fe290 Fixed: 1006239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237448 Auto-Submit: David Baron <dbaron@chromium.org> Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#933958}
…ition.html., a=testonly Automatic update from web-platform-tests Fix 2 test expectations in rotate-composition.html. I previously adjusted the expectations for this test in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac . However, I believe these two expectations were incorrect both before and after that adjustment, and the behavior shown in both Chromium and Gecko is correct. (WebKit differs slightly by producing 'none' rather than '0deg'.) I think this is correct because we're interpolating between two transforms: (a) '1 2 3 360deg' (the result of an add) (b) '0 1 0 100deg' Since the normalized axes differ, this interpolation falls into the rules for interpolation of matrices, as described in https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions . (The rules for the 'rotate' property incorrectly say that SLERP is always used, but I think that should be fixed to match the rules for the rotate() function. Either way, however, this test expectation should be based on interpolation of matrices using SLERP.) Since the matrix for (a) is the identity matrix, and the progress of the interpolation is at 0, the result is the identity matrix, which should (although the spec should make this explicit) be represented as 0deg. This should be fixed in w3c/csswg-drafts#4516 . Bug: 1180834 Change-Id: I0a5e15535da56949fc88bdf48423b41d409fe290 Fixed: 1006239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237448 Auto-Submit: David Baron <dbaron@chromium.org> Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#933958} -- wpt-commits: eba3c32a20388ad2fe560d27dc08999ace4b96f2 wpt-pr: 31350
…ition.html., a=testonly Automatic update from web-platform-tests Fix 2 test expectations in rotate-composition.html. I previously adjusted the expectations for this test in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac . However, I believe these two expectations were incorrect both before and after that adjustment, and the behavior shown in both Chromium and Gecko is correct. (WebKit differs slightly by producing 'none' rather than '0deg'.) I think this is correct because we're interpolating between two transforms: (a) '1 2 3 360deg' (the result of an add) (b) '0 1 0 100deg' Since the normalized axes differ, this interpolation falls into the rules for interpolation of matrices, as described in https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions . (The rules for the 'rotate' property incorrectly say that SLERP is always used, but I think that should be fixed to match the rules for the rotate() function. Either way, however, this test expectation should be based on interpolation of matrices using SLERP.) Since the matrix for (a) is the identity matrix, and the progress of the interpolation is at 0, the result is the identity matrix, which should (although the spec should make this explicit) be represented as 0deg. This should be fixed in w3c/csswg-drafts#4516 . Bug: 1180834 Change-Id: I0a5e15535da56949fc88bdf48423b41d409fe290 Fixed: 1006239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237448 Auto-Submit: David Baron <dbaron@chromium.org> Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#933958} -- wpt-commits: eba3c32a20388ad2fe560d27dc08999ace4b96f2 wpt-pr: 31350
I previously adjusted the expectations for this test in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac . However, I believe these two expectations were incorrect both before and after that adjustment, and the behavior shown in both Chromium and Gecko is correct. (WebKit differs slightly by producing 'none' rather than '0deg'.) I think this is correct because we're interpolating between two transforms: (a) '1 2 3 360deg' (the result of an add) (b) '0 1 0 100deg' Since the normalized axes differ, this interpolation falls into the rules for interpolation of matrices, as described in https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions . (The rules for the 'rotate' property incorrectly say that SLERP is always used, but I think that should be fixed to match the rules for the rotate() function. Either way, however, this test expectation should be based on interpolation of matrices using SLERP.) Since the matrix for (a) is the identity matrix, and the progress of the interpolation is at 0, the result is the identity matrix, which should (although the spec should make this explicit) be represented as 0deg. This should be fixed in w3c/csswg-drafts#4516 . Bug: 1180834 Change-Id: I0a5e15535da56949fc88bdf48423b41d409fe290 Fixed: 1006239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237448 Auto-Submit: David Baron <dbaron@chromium.org> Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#933958}
Uh oh!
There was an error while loading. Please reload this page.
It would be nice to have interop for the interpolation on rotate property if possible, but at very least "SLERP" in the spec should probably link to somewhere, e.g. interpolation on quaternion vectors. And it'd be great to provide more details about how to convert a rotate axis and angle into a quaternion.
For example:
rotate: x y z Tdeg
into quaternion(a, b, c, d)
for from and to values.(a', b', c', d')
, intorotate: x' y' z' T'deg
.If (2) (4) are included in the decomposing/recomposing of the 4x4 matrix, perhaps we should explicitly mention it.
The text was updated successfully, but these errors were encountered: