mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +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)
|
||||
image = spine.Skeleton.failed
|
||||
end
|
||||
print(slot.data.additiveBlending)
|
||||
if slot.data.additiveBlending then
|
||||
image.blendMode = "add"
|
||||
end
|
||||
images[slot] = image
|
||||
end
|
||||
-- Position image based on attachment and bone.
|
||||
|
||||
@ -115,9 +115,10 @@ function SkeletonJson.new (attachmentLoader)
|
||||
end
|
||||
|
||||
slotData.attachmentName = slotMap["attachment"]
|
||||
table.insert(skeletonData.slots, slotData)
|
||||
skeletonData.slotNameIndices[slotData.name] = #skeletonData.slots
|
||||
|
||||
slotData.additiveBlending = slotMap["additive"]
|
||||
|
||||
table.insert(skeletonData.slots, slotData)
|
||||
skeletonData.slotNameIndices[slotData.name] = #skeletonData.slots
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user