@esotericsoftware/spine-pixi-v8 4.2.106 → 4.2.108
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/Spine.js +5 -3
- package/dist/SpinePipe.js +8 -6
- package/dist/assets/atlasLoader.js +4 -3
- package/dist/assets/skeletonLoader.js +4 -3
- package/dist/esm/spine-pixi-v8.min.mjs +3 -3
- package/dist/esm/spine-pixi-v8.mjs +13 -10
- package/dist/esm/spine-pixi-v8.mjs.map +2 -2
- package/dist/iife/spine-pixi-v8.js +13 -10
- package/dist/iife/spine-pixi-v8.js.map +2 -2
- package/dist/iife/spine-pixi-v8.min.js +3 -3
- package/package.json +2 -2
|
@@ -12037,8 +12037,9 @@ var spine = (() => {
|
|
|
12037
12037
|
},
|
|
12038
12038
|
async load(url) {
|
|
12039
12039
|
const response = await import_pixi2.DOMAdapter.get().fetch(url);
|
|
12040
|
-
|
|
12041
|
-
|
|
12040
|
+
if (!response.ok)
|
|
12041
|
+
throw new Error(`[${loaderName}] Failed to fetch ${url}: ${response.status} ${response.statusText}`);
|
|
12042
|
+
return await response.text();
|
|
12042
12043
|
},
|
|
12043
12044
|
testParse(asset, options) {
|
|
12044
12045
|
const isExtensionRight = (0, import_pixi2.checkExtension)(options.src, ".atlas");
|
|
@@ -12113,8 +12114,9 @@ var spine = (() => {
|
|
|
12113
12114
|
},
|
|
12114
12115
|
async load(url) {
|
|
12115
12116
|
const response = await import_pixi3.DOMAdapter.get().fetch(url);
|
|
12116
|
-
|
|
12117
|
-
|
|
12117
|
+
if (!response.ok)
|
|
12118
|
+
throw new Error(`[${loaderName2}] Failed to fetch ${url}: ${response.status} ${response.statusText}`);
|
|
12119
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
12118
12120
|
},
|
|
12119
12121
|
testParse(asset, options) {
|
|
12120
12122
|
const isJsonSpineModel = (0, import_pixi3.checkExtension)(options.src, ".json") && isJson(asset);
|
|
@@ -12732,6 +12734,7 @@ var spine = (() => {
|
|
|
12732
12734
|
} else if (spine.spineTexturesDirty) {
|
|
12733
12735
|
const drawOrder = spine.skeleton.drawOrder;
|
|
12734
12736
|
const gpuSpine = this.gpuSpineData[spine.uid];
|
|
12737
|
+
if (!gpuSpine) return false;
|
|
12735
12738
|
for (let i = 0, n = drawOrder.length; i < n; i++) {
|
|
12736
12739
|
const slot = drawOrder[i];
|
|
12737
12740
|
const attachment = slot.getAttachment();
|
|
@@ -12803,16 +12806,15 @@ var spine = (() => {
|
|
|
12803
12806
|
const containerAttachment = spine._slotsObject[slot.data.name];
|
|
12804
12807
|
if (containerAttachment) {
|
|
12805
12808
|
const container = containerAttachment.container;
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
container.collectRenderables(instructionSet, this.renderer, null);
|
|
12809
|
-
}
|
|
12809
|
+
container.includeInBuild = true;
|
|
12810
|
+
container.collectRenderables(instructionSet, this.renderer, null);
|
|
12810
12811
|
container.includeInBuild = false;
|
|
12811
12812
|
}
|
|
12812
12813
|
}
|
|
12813
12814
|
}
|
|
12814
12815
|
updateRenderable(spine) {
|
|
12815
12816
|
const gpuSpine = this.gpuSpineData[spine.uid];
|
|
12817
|
+
if (!gpuSpine) return;
|
|
12816
12818
|
spine._validateAndTransformAttachments();
|
|
12817
12819
|
spine.spineAttachmentsDirty = false;
|
|
12818
12820
|
spine.spineTexturesDirty = false;
|
|
@@ -13335,7 +13337,8 @@ var spine = (() => {
|
|
|
13335
13337
|
updateSlotObject(slotAttachment) {
|
|
13336
13338
|
const { slot, container } = slotAttachment;
|
|
13337
13339
|
const followAttachmentValue = slotAttachment.followAttachmentTimeline ? Boolean(slot.attachment) : true;
|
|
13338
|
-
|
|
13340
|
+
const slotAlpha = this.skeleton.color.a * slot.color.a;
|
|
13341
|
+
container.visible = this.skeleton.drawOrder.includes(slot) && followAttachmentValue && this.alpha > 0 && slotAlpha > 0;
|
|
13339
13342
|
if (container.visible) {
|
|
13340
13343
|
let bone = slot.bone;
|
|
13341
13344
|
const matrix = container.localTransform;
|
|
@@ -13346,7 +13349,7 @@ var spine = (() => {
|
|
|
13346
13349
|
matrix.tx = bone.worldX;
|
|
13347
13350
|
matrix.ty = bone.worldY;
|
|
13348
13351
|
container.setFromMatrix(matrix);
|
|
13349
|
-
container.alpha =
|
|
13352
|
+
container.alpha = slotAlpha;
|
|
13350
13353
|
}
|
|
13351
13354
|
}
|
|
13352
13355
|
/** @internal */
|