diff --git a/spine-ts/spine-pixi-v8/src/Spine.ts b/spine-ts/spine-pixi-v8/src/Spine.ts index ae173aa16..fef750003 100644 --- a/spine-ts/spine-pixi-v8/src/Spine.ts +++ b/spine-ts/spine-pixi-v8/src/Spine.ts @@ -812,7 +812,10 @@ export class Spine extends ViewContainer { const { slot, container } = slotAttachment; const followAttachmentValue = slotAttachment.followAttachmentTimeline ? Boolean(slot.attachment) : true; - container.visible = this.skeleton.drawOrder.includes(slot) && followAttachmentValue; + const slotAlpha = this.skeleton.color.a * slot.color.a; + + container.visible = this.skeleton.drawOrder.includes(slot) && followAttachmentValue + && this.alpha > 0 && slotAlpha > 0; if (container.visible) { let bone = slot.bone; @@ -826,7 +829,7 @@ export class Spine extends ViewContainer { matrix.ty = bone.worldY; container.setFromMatrix(matrix); - container.alpha = this.skeleton.color.a * slot.color.a; + container.alpha = slotAlpha; } } diff --git a/spine-ts/spine-pixi-v8/src/SpinePipe.ts b/spine-ts/spine-pixi-v8/src/SpinePipe.ts index 658ef9fba..51e9c30e6 100644 --- a/spine-ts/spine-pixi-v8/src/SpinePipe.ts +++ b/spine-ts/spine-pixi-v8/src/SpinePipe.ts @@ -90,6 +90,8 @@ export class SpinePipe implements RenderPipe { const drawOrder = spine.skeleton.drawOrder; const gpuSpine = this.gpuSpineData[spine.uid]; + if (!gpuSpine) return false; + for (let i = 0, n = drawOrder.length; i < n; i++) { const slot = drawOrder[i]; const attachment = slot.getAttachment(); @@ -185,11 +187,9 @@ export class SpinePipe implements RenderPipe { if (containerAttachment) { const container = containerAttachment.container; - if (!skipRender) { - container.includeInBuild = true; - // See https://github.com/pixijs/pixijs/blob/b4c050a791fe65e979e467c9cba2bda0c01a1c35/src/scene/container/utils/collectAllRenderables.ts#L28 - container.collectRenderables(instructionSet, this.renderer, null!); - } + container.includeInBuild = true; + // See https://github.com/pixijs/pixijs/blob/b4c050a791fe65e979e467c9cba2bda0c01a1c35/src/scene/container/utils/collectAllRenderables.ts#L28 + container.collectRenderables(instructionSet, this.renderer, null!); container.includeInBuild = false; } @@ -199,6 +199,8 @@ export class SpinePipe implements RenderPipe { updateRenderable (spine: Spine) { const gpuSpine = this.gpuSpineData[spine.uid]; + if (!gpuSpine) return; + spine._validateAndTransformAttachments(); spine.spineAttachmentsDirty = false;