From 25bea5e7b8c6b349fbac63e55c340d51e30fcd0c Mon Sep 17 00:00:00 2001 From: Luke Ingram Date: Wed, 26 Jan 2022 14:15:26 -0400 Subject: [PATCH] [ts] Port of additive scale mixing fix, see #2028 --- spine-ts/spine-core/src/Animation.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-ts/spine-core/src/Animation.ts b/spine-ts/spine-core/src/Animation.ts index 0f5964a7c..8ac8c8111 100644 --- a/spine-ts/spine-core/src/Animation.ts +++ b/spine-ts/spine-core/src/Animation.ts @@ -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) {