From c725e52aad22b3342f786145c5762c05db8a7a78 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Tue, 30 Jul 2024 18:46:50 +0200 Subject: [PATCH 1/2] fix: textures change was not take into account --- src/Spine.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Spine.ts b/src/Spine.ts index 18f6349..9f67f11 100644 --- a/src/Spine.ts +++ b/src/Spine.ts @@ -402,6 +402,7 @@ export class Spine extends Container implements View if (attachment instanceof MeshAttachment || attachment instanceof RegionAttachment) { const cacheData = this._getCachedData(slot, attachment); + const previousAttachment = attachment.region?.texture.texture; if (attachment instanceof RegionAttachment) { @@ -419,6 +420,8 @@ export class Spine extends Container implements View ); } + if (attachment.region.texture.texture !== previousAttachment) this.spineAttachmentsDirty = true; + cacheData.clipped = false; if (clipper.isClipping()) From 9876f0421e2004180a8f020366d4d074e5c3e3ea Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Thu, 1 Aug 2024 17:47:43 +0200 Subject: [PATCH 2/2] Add missing optional chaining operator --- src/Spine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spine.ts b/src/Spine.ts index 9f67f11..24e7455 100644 --- a/src/Spine.ts +++ b/src/Spine.ts @@ -420,7 +420,7 @@ export class Spine extends Container implements View ); } - if (attachment.region.texture.texture !== previousAttachment) this.spineAttachmentsDirty = true; + if (attachment.region?.texture.texture !== previousAttachment) this.spineAttachmentsDirty = true; cacheData.clipped = false;