@esotericsoftware/spine-webgl 4.1.18 → 4.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/iife/spine-webgl.js
CHANGED
|
@@ -555,7 +555,7 @@ var spine = (() => {
|
|
|
555
555
|
this.bones = null;
|
|
556
556
|
this.vertices = [];
|
|
557
557
|
this.worldVerticesLength = 0;
|
|
558
|
-
this.
|
|
558
|
+
this.timelineAttachment = this;
|
|
559
559
|
}
|
|
560
560
|
computeWorldVertices(slot, start, count, worldVertices, offset, stride) {
|
|
561
561
|
count = offset + (count >> 1) * stride;
|
|
@@ -626,7 +626,7 @@ var spine = (() => {
|
|
|
626
626
|
Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);
|
|
627
627
|
}
|
|
628
628
|
attachment.worldVerticesLength = this.worldVerticesLength;
|
|
629
|
-
attachment.
|
|
629
|
+
attachment.timelineAttachment = this.timelineAttachment;
|
|
630
630
|
}
|
|
631
631
|
};
|
|
632
632
|
var VertexAttachment = _VertexAttachment;
|
|
@@ -1925,7 +1925,7 @@ var spine = (() => {
|
|
|
1925
1925
|
let slotAttachment = slot.getAttachment();
|
|
1926
1926
|
if (!slotAttachment)
|
|
1927
1927
|
return;
|
|
1928
|
-
if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.
|
|
1928
|
+
if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)
|
|
1929
1929
|
return;
|
|
1930
1930
|
let deform = slot.deform;
|
|
1931
1931
|
if (deform.length == 0)
|
|
@@ -2504,7 +2504,7 @@ var spine = (() => {
|
|
|
2504
2504
|
let slotAttachment = slot.attachment;
|
|
2505
2505
|
let attachment = this.attachment;
|
|
2506
2506
|
if (slotAttachment != attachment) {
|
|
2507
|
-
if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.
|
|
2507
|
+
if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)
|
|
2508
2508
|
return;
|
|
2509
2509
|
}
|
|
2510
2510
|
let frames = this.frames;
|
|
@@ -2517,6 +2517,8 @@ var spine = (() => {
|
|
|
2517
2517
|
let before = frames[i];
|
|
2518
2518
|
let modeAndIndex = frames[i + _SequenceTimeline.MODE];
|
|
2519
2519
|
let delay = frames[i + _SequenceTimeline.DELAY];
|
|
2520
|
+
if (!this.attachment.sequence)
|
|
2521
|
+
return;
|
|
2520
2522
|
let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;
|
|
2521
2523
|
let mode = SequenceModeValues[modeAndIndex & 15];
|
|
2522
2524
|
if (mode != SequenceMode.hold) {
|
|
@@ -2530,7 +2532,7 @@ var spine = (() => {
|
|
|
2530
2532
|
break;
|
|
2531
2533
|
case SequenceMode.pingpong: {
|
|
2532
2534
|
let n = (count << 1) - 2;
|
|
2533
|
-
index
|
|
2535
|
+
index = n == 0 ? 0 : index % n;
|
|
2534
2536
|
if (index >= count)
|
|
2535
2537
|
index = n - index;
|
|
2536
2538
|
break;
|
|
@@ -2543,7 +2545,7 @@ var spine = (() => {
|
|
|
2543
2545
|
break;
|
|
2544
2546
|
case SequenceMode.pingpongReverse: {
|
|
2545
2547
|
let n = (count << 1) - 2;
|
|
2546
|
-
index = (index + count - 1) % n;
|
|
2548
|
+
index = n == 0 ? 0 : (index + count - 1) % n;
|
|
2547
2549
|
if (index >= count)
|
|
2548
2550
|
index = n - index;
|
|
2549
2551
|
}
|
|
@@ -3831,7 +3833,7 @@ var spine = (() => {
|
|
|
3831
3833
|
let copy = new MeshAttachment(this.name, this.path);
|
|
3832
3834
|
copy.region = this.region;
|
|
3833
3835
|
copy.color.setFromColor(this.color);
|
|
3834
|
-
copy.
|
|
3836
|
+
copy.timelineAttachment = this.timelineAttachment;
|
|
3835
3837
|
copy.setParentMesh(this.parentMesh ? this.parentMesh : this);
|
|
3836
3838
|
if (copy.region != null)
|
|
3837
3839
|
copy.updateRegion();
|
|
@@ -5479,7 +5481,7 @@ var spine = (() => {
|
|
|
5479
5481
|
setAttachment(attachment) {
|
|
5480
5482
|
if (this.attachment == attachment)
|
|
5481
5483
|
return;
|
|
5482
|
-
if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.
|
|
5484
|
+
if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {
|
|
5483
5485
|
this.deform.length = 0;
|
|
5484
5486
|
}
|
|
5485
5487
|
this.attachment = attachment;
|
|
@@ -6685,7 +6687,7 @@ var spine = (() => {
|
|
|
6685
6687
|
let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
|
6686
6688
|
if (!parent)
|
|
6687
6689
|
throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);
|
|
6688
|
-
linkedMesh.mesh.
|
|
6690
|
+
linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;
|
|
6689
6691
|
linkedMesh.mesh.setParentMesh(parent);
|
|
6690
6692
|
if (linkedMesh.mesh.region != null)
|
|
6691
6693
|
linkedMesh.mesh.updateRegion();
|
|
@@ -8492,7 +8494,7 @@ var spine = (() => {
|
|
|
8492
8494
|
let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
|
8493
8495
|
if (!parent)
|
|
8494
8496
|
throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);
|
|
8495
|
-
linkedMesh.mesh.
|
|
8497
|
+
linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;
|
|
8496
8498
|
linkedMesh.mesh.setParentMesh(parent);
|
|
8497
8499
|
if (linkedMesh.mesh.region != null)
|
|
8498
8500
|
linkedMesh.mesh.updateRegion();
|