From dca79e4731394d0bb19c73f694a81a787e9f6d1e Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Tue, 16 Apr 2024 13:07:08 +0200 Subject: [PATCH] [ts] Fix SkeletonBinary read sequence. Fix Animation ScaleYTimeline. --- spine-ts/spine-core/src/Animation.ts | 4 ++-- spine-ts/spine-core/src/SkeletonBinary.ts | 1 - spine-ts/spine-core/src/SkeletonJson.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spine-ts/spine-core/src/Animation.ts b/spine-ts/spine-core/src/Animation.ts index 2be3f2ac6d..ff9a5d0b85 100644 --- a/spine-ts/spine-core/src/Animation.ts +++ b/spine-ts/spine-core/src/Animation.ts @@ -708,7 +708,7 @@ export class ScaleYTimeline extends CurveTimeline1 implements BoneTimeline { apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) { let bone = skeleton.bones[this.boneIndex]; - if (bone.active) bone.scaleY = this.getScaleValue(time, alpha, blend, direction, bone.scaleX, bone.data.scaleY); + if (bone.active) bone.scaleY = this.getScaleValue(time, alpha, blend, direction, bone.scaleY, bone.data.scaleY); } } @@ -1694,7 +1694,7 @@ export class DrawOrderTimeline extends Timeline { /** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness}, * {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */ export class IkConstraintTimeline extends CurveTimeline { - /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is */ + /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */ constraintIndex: number = 0; constructor (frameCount: number, bezierCount: number, ikConstraintIndex: number) { diff --git a/spine-ts/spine-core/src/SkeletonBinary.ts b/spine-ts/spine-core/src/SkeletonBinary.ts index 21b2313acb..fa410e6729 100644 --- a/spine-ts/spine-core/src/SkeletonBinary.ts +++ b/spine-ts/spine-core/src/SkeletonBinary.ts @@ -531,7 +531,6 @@ export class SkeletonBinary { } private readSequence (input: BinaryInput) { - if (!input.readBoolean()) return null; let sequence = new Sequence(input.readInt(true)); sequence.start = input.readInt(true); sequence.digits = input.readInt(true); diff --git a/spine-ts/spine-core/src/SkeletonJson.ts b/spine-ts/spine-core/src/SkeletonJson.ts index 82703134cd..729ccc1b54 100644 --- a/spine-ts/spine-core/src/SkeletonJson.ts +++ b/spine-ts/spine-core/src/SkeletonJson.ts @@ -246,8 +246,8 @@ export class SkeletonJson { } } + // Physics constraints. if (root.physics) { - // Physics constraints. for (let i = 0; i < root.physics.length; i++) { const constraintMap = root.physics[i]; const data = new PhysicsConstraintData(constraintMap.name);