[lua] Ensure clipper.clipEnd() is called appropriately. See #1694

This commit is contained in:
Mario Zechner 2021-06-14 15:27:20 +02:00
parent 4be695bf28
commit 3f735ed0be
2 changed files with 5 additions and 0 deletions

View File

@ -352,6 +352,9 @@ function SkeletonRenderer:draw (skeleton)
elseif attachment.type == spine.AttachmentType.clipping then
self.clipper:clipStart(slot, attachment)
break -- continues for loop
else
self.clipper:clipEnd(slot)
break -- continues for loop
end
if texture then

View File

@ -227,6 +227,8 @@ function spine.Skeleton:updateWorldTransform()
end
if not isClippingAttachment then self.clipper:clipEnd(slot) end
end
else
self.clipper:clipEnd(slot)
end
end