BUGFIX: mesh attachment squashing (#1881)

This commit is contained in:
Anton 2021-04-27 14:32:20 +03:00 committed by GitHub
parent 204f8672ed
commit a0ab3fe80c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1455,7 +1455,7 @@ module spine {
}
setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
}
}

View File

@ -270,7 +270,7 @@ module spine {
var slot = slots[i];
if (slot.attachmentState == setupState) {
var attachmentName = slot.data.attachmentName;
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
}
}
this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.
@ -390,7 +390,7 @@ module spine {
}
setAttachment (skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;
}