[ts] Port of additive scale mixing fix, see #2028

This commit is contained in:
Luke Ingram 2022-01-26 14:15:26 -04:00
parent f5f91899f4
commit 25bea5e7b8

View File

@ -622,8 +622,8 @@ export class ScaleTimeline extends CurveTimeline2 implements BoneTimeline {
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
break;
case MixBlend.add:
bone.scaleX = (x - bone.data.scaleX) * alpha;
bone.scaleY = (y - bone.data.scaleY) * alpha;
bone.scaleX += (x - bone.data.scaleX) * alpha;
bone.scaleY += (y - bone.data.scaleY) * alpha;
}
} else {
switch (blend) {
@ -695,7 +695,7 @@ export class ScaleXTimeline extends CurveTimeline1 implements BoneTimeline {
bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
break;
case MixBlend.add:
bone.scaleX = (x - bone.data.scaleX) * alpha;
bone.scaleX += (x - bone.data.scaleX) * alpha;
}
} else {
switch (blend) {
@ -762,7 +762,7 @@ export class ScaleYTimeline extends CurveTimeline1 implements BoneTimeline {
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
break;
case MixBlend.add:
bone.scaleY = (y - bone.data.scaleY) * alpha;
bone.scaleY += (y - bone.data.scaleY) * alpha;
}
} else {
switch (blend) {