[skottie] Fix 3d rotation order
TBR=reed Change-Id: I07263ad7ef0b86ce1ace19d68f3f3b08cfd76dfd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210300 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
parent
46d0f9aad1
commit
b783a43f0d
@ -90,13 +90,12 @@ SkMatrix44 TransformAdapter3D::totalMatrix() const {
|
||||
t.setTranslate(-fAnchorPoint.fX, -fAnchorPoint.fY, -fAnchorPoint.fZ);
|
||||
t.postScale(fScale.fX / 100, fScale.fY / 100, fScale.fZ / 100);
|
||||
|
||||
// TODO: SkMatrix44:postRotate()?
|
||||
SkMatrix44 r;
|
||||
r.setRotateDegreesAbout(1, 0, 0, fRotation.fX);
|
||||
r.setRotateDegreesAbout(0, 0, 1, fRotation.fZ);
|
||||
t.postConcat(r);
|
||||
r.setRotateDegreesAbout(0, 1, 0, fRotation.fY);
|
||||
t.postConcat(r);
|
||||
r.setRotateDegreesAbout(0, 0, 1, fRotation.fZ);
|
||||
r.setRotateDegreesAbout(1, 0, 0, fRotation.fX);
|
||||
t.postConcat(r);
|
||||
|
||||
t.postTranslate(fPosition.fX, fPosition.fY, fPosition.fZ);
|
||||
|
1
modules/skottie/tests/3d-rotation-order.json
Normal file
1
modules/skottie/tests/3d-rotation-order.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user