[ts] Formatting

This commit is contained in:
Mario Zechner 2023-12-03 22:07:49 +01:00
parent ae67ba9b8d
commit 4d72bf940c
2 changed files with 5 additions and 3 deletions

View File

@ -335,7 +335,7 @@ export class SkeletonBinary {
skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);
for (let i = 0, n = input.readInt(true); i < n; i++)
skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);
for (let i = 0, n = input.readInt(true); i < n; i++)
for (let i = 0, n = input.readInt(true); i < n; i++)
skin.constraints.push(skeletonData.physicsConstraints[input.readInt(true)]);
slotCount = input.readInt(true);
@ -345,7 +345,8 @@ export class SkeletonBinary {
let slotIndex = input.readInt(true);
for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {
let name = input.readStringRef();
if (!name) throw new Error("Attachment name must not be null");
if (!name)
throw new Error("Attachment name must not be null");
let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);
if (attachment) skin.setAttachment(slotIndex, name, attachment);
}
@ -353,7 +354,7 @@ export class SkeletonBinary {
return skin;
}
private readAttachment (input: BinaryInput, skeletonData: SkeletonData, skin: Skin, slotIndex: number, attachmentName: string, nonessential: boolean): Attachment | null {
private readAttachment (input: BinaryInput, skeletonData: SkeletonData, skin: Skin, slotIndex: number, attachmentName: string | null | undefined, nonessential: boolean): Attachment | null {
let scale = this.scale;
let flags = input.readByte();

View File

@ -53,6 +53,7 @@
this.animationState.apply(this.skeleton);
// Let the skeleton update the transforms of its bones.
this.skeleton.updateWorldTransform(spine.Physics.update);
this.skeleton.update(delta);
}
render(canvas) {