mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Linearly interpolate rotation angles with equal direction
Fixes #11808, but still leaves matrix interpolation open.
This commit is contained in:
parent
d3a81373e4
commit
e10288ec1c
1 changed files with 8 additions and 3 deletions
|
@ -663,10 +663,15 @@ fn interpolate_transform_list(from_list: &[TransformOperation],
|
|||
result.push(TransformOperation::Scale(ix, iy, iz));
|
||||
}
|
||||
(&TransformOperation::Rotate(fx, fy, fz, fa),
|
||||
&TransformOperation::Rotate(_tx, _ty, _tz, _ta)) => {
|
||||
&TransformOperation::Rotate(tx, ty, tz, ta)) => {
|
||||
if fx == tx && fy == ty && fz == tz {
|
||||
let ia = fa.interpolate(&ta, time).unwrap();
|
||||
result.push(TransformOperation::Rotate(fx, fy, fz, ia));
|
||||
} else {
|
||||
// TODO(gw): Implement matrix decomposition and interpolation
|
||||
result.push(TransformOperation::Rotate(fx, fy, fz, fa));
|
||||
}
|
||||
}
|
||||
(&TransformOperation::Perspective(fd),
|
||||
&TransformOperation::Perspective(_td)) => {
|
||||
// TODO(gw): Implement matrix decomposition and interpolation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue