mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-05 10:16:54 +08:00
[ts] Formatting
This commit is contained in:
parent
ae67ba9b8d
commit
4d72bf940c
@ -335,7 +335,7 @@ export class SkeletonBinary {
|
|||||||
skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);
|
skin.constraints.push(skeletonData.transformConstraints[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.pathConstraints[input.readInt(true)]);
|
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)]);
|
skin.constraints.push(skeletonData.physicsConstraints[input.readInt(true)]);
|
||||||
|
|
||||||
slotCount = input.readInt(true);
|
slotCount = input.readInt(true);
|
||||||
@ -345,7 +345,8 @@ export class SkeletonBinary {
|
|||||||
let slotIndex = input.readInt(true);
|
let slotIndex = input.readInt(true);
|
||||||
for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {
|
for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {
|
||||||
let name = input.readStringRef();
|
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);
|
let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);
|
||||||
if (attachment) skin.setAttachment(slotIndex, name, attachment);
|
if (attachment) skin.setAttachment(slotIndex, name, attachment);
|
||||||
}
|
}
|
||||||
@ -353,7 +354,7 @@ export class SkeletonBinary {
|
|||||||
return skin;
|
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 scale = this.scale;
|
||||||
|
|
||||||
let flags = input.readByte();
|
let flags = input.readByte();
|
||||||
|
|||||||
@ -53,6 +53,7 @@
|
|||||||
this.animationState.apply(this.skeleton);
|
this.animationState.apply(this.skeleton);
|
||||||
// Let the skeleton update the transforms of its bones.
|
// Let the skeleton update the transforms of its bones.
|
||||||
this.skeleton.updateWorldTransform(spine.Physics.update);
|
this.skeleton.updateWorldTransform(spine.Physics.update);
|
||||||
|
this.skeleton.update(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
render(canvas) {
|
render(canvas) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user