mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cpp] Ported scale mixing fix, see #2028.
This commit is contained in:
parent
c8fe2c884b
commit
65c62bff06
@ -131,8 +131,8 @@ void ScaleTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector
|
|||||||
bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha;
|
bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha;
|
||||||
break;
|
break;
|
||||||
case MixBlend_Add:
|
case MixBlend_Add:
|
||||||
bone->_scaleX = (x - bone->_data._scaleX) * alpha;
|
bone->_scaleX += (x - bone->_data._scaleX) * alpha;
|
||||||
bone->_scaleY = (y - bone->_data._scaleY) * alpha;
|
bone->_scaleY += (y - bone->_data._scaleY) * alpha;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (blend) {
|
switch (blend) {
|
||||||
@ -210,7 +210,7 @@ void ScaleXTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto
|
|||||||
bone->_scaleX = bx + (MathUtil::abs(x) * MathUtil::sign(bx) - bx) * alpha;
|
bone->_scaleX = bx + (MathUtil::abs(x) * MathUtil::sign(bx) - bx) * alpha;
|
||||||
break;
|
break;
|
||||||
case MixBlend_Add:
|
case MixBlend_Add:
|
||||||
bone->_scaleX = (x - bone->_data._scaleX) * alpha;
|
bone->_scaleX += (x - bone->_data._scaleX) * alpha;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (blend) {
|
switch (blend) {
|
||||||
@ -283,7 +283,7 @@ void ScaleYTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto
|
|||||||
bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha;
|
bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha;
|
||||||
break;
|
break;
|
||||||
case MixBlend_Add:
|
case MixBlend_Add:
|
||||||
bone->_scaleY = (y - bone->_data._scaleY) * alpha;
|
bone->_scaleY += (y - bone->_data._scaleY) * alpha;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (blend) {
|
switch (blend) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user