mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
Additive blending for spine-lua and spine-corona.
This commit is contained in:
parent
e8ff8fd1f3
commit
a5008e221e
@ -115,6 +115,10 @@ function spine.Skeleton.new (skeletonData, group)
|
|||||||
print("Error creating image: " .. attachment.name)
|
print("Error creating image: " .. attachment.name)
|
||||||
image = spine.Skeleton.failed
|
image = spine.Skeleton.failed
|
||||||
end
|
end
|
||||||
|
print(slot.data.additiveBlending)
|
||||||
|
if slot.data.additiveBlending then
|
||||||
|
image.blendMode = "add"
|
||||||
|
end
|
||||||
images[slot] = image
|
images[slot] = image
|
||||||
end
|
end
|
||||||
-- Position image based on attachment and bone.
|
-- Position image based on attachment and bone.
|
||||||
|
|||||||
@ -115,9 +115,10 @@ function SkeletonJson.new (attachmentLoader)
|
|||||||
end
|
end
|
||||||
|
|
||||||
slotData.attachmentName = slotMap["attachment"]
|
slotData.attachmentName = slotMap["attachment"]
|
||||||
|
slotData.additiveBlending = slotMap["additive"]
|
||||||
|
|
||||||
table.insert(skeletonData.slots, slotData)
|
table.insert(skeletonData.slots, slotData)
|
||||||
skeletonData.slotNameIndices[slotData.name] = #skeletonData.slots
|
skeletonData.slotNameIndices[slotData.name] = #skeletonData.slots
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user