Skip to content

Commit

Permalink
[ts] Fix SkeletonBinary read sequence. Fix Animation ScaleYTimeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidetan committed Apr 16, 2024
1 parent 9b5dcda commit dca79e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spine-ts/spine-core/src/Animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ export class ScaleYTimeline extends CurveTimeline1 implements BoneTimeline {

apply (skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, 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);
}
}

Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion spine-ts/spine-core/src/SkeletonBinary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion spine-ts/spine-core/src/SkeletonJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dca79e4

Please sign in to comment.