Additive blending for spine-lua and spine-corona.

This commit is contained in:
NathanSweet 2013-09-30 14:50:04 +02:00
parent e8ff8fd1f3
commit a5008e221e
2 changed files with 8 additions and 3 deletions

View File

@ -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.

View File

@ -115,9 +115,10 @@ function SkeletonJson.new (attachmentLoader)
end
slotData.attachmentName = slotMap["attachment"]
slotData.additiveBlending = slotMap["additive"]
table.insert(skeletonData.slots, slotData)
skeletonData.slotNameIndices[slotData.name] = #skeletonData.slots
end
end