From 8708c9b604e3993c9d9a0f6c17ded9bd644f9b50 Mon Sep 17 00:00:00 2001 From: Davide <7047501+davidetan@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:15:38 +0200 Subject: [PATCH] fix: clipping termination on same slot, always set dirty when vertex count change (see #33). (#34) --- src/Spine.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Spine.ts b/src/Spine.ts index c1e923b..6867841 100644 --- a/src/Spine.ts +++ b/src/Spine.ts @@ -442,14 +442,11 @@ export class Spine extends Container implements View else if (attachment instanceof ClippingAttachment) { clipper.clipStart(slot, attachment); - } - else - { - clipper.clipEndWithSlot(slot); + continue; } } + clipper.clipEndWithSlot(slot); } - clipper.clipEnd(); } @@ -492,7 +489,7 @@ export class Spine extends Container implements View cacheData.skipRender = verticesCount === 0; - if (sizeChange && !cacheData.skipRender) + if (sizeChange) { this.spineAttachmentsDirty = true;