소스 검색

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

Luke Ingram 3 년 전
부모
커밋
25bea5e7b8
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      spine-ts/spine-core/src/Animation.ts

+ 4 - 4
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) {