mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[corona] Fixed clipping, closes #1522.
This commit is contained in:
parent
2e034226d3
commit
23b51853ce
@ -163,7 +163,7 @@ function spine.Skeleton:updateWorldTransform()
|
||||
local indices = nil
|
||||
|
||||
if slot.bone.active then
|
||||
|
||||
local isClippingAttachment = false
|
||||
if attachment then
|
||||
if attachment.type == spine.AttachmentType.region then
|
||||
numVertices = 4
|
||||
@ -183,6 +183,7 @@ function spine.Skeleton:updateWorldTransform()
|
||||
blendMode = toCoronaBlendMode(slot.data.blendMode)
|
||||
elseif attachment.type == spine.AttachmentType.clipping then
|
||||
self.clipper:clipStart(slot, attachment)
|
||||
isClippingAttachment = true
|
||||
end
|
||||
|
||||
if texture and vertices and indices then
|
||||
@ -222,9 +223,9 @@ function spine.Skeleton:updateWorldTransform()
|
||||
end
|
||||
|
||||
self:batch(vertices, uvs, numVertices, indices, groupVertices, groupUvs, groupIndices)
|
||||
end
|
||||
|
||||
self.clipper:clipEnd(slot)
|
||||
end
|
||||
if not isClippingAttachment then self.clipper:clipEnd(slot) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user