mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 02:58:44 +08:00
Add Lua support for reading scale and rotation inheritance
This commit is contained in:
parent
fb21554a49
commit
09ff781a9a
@ -75,6 +75,10 @@ function SkeletonJson.new (attachmentLoader)
|
||||
boneData.rotation = (boneMap["rotation"] or 0)
|
||||
boneData.scaleX = (boneMap["scaleX"] or 1)
|
||||
boneData.scaleY = (boneMap["scaleY"] or 1)
|
||||
-- typical 'value or default' will not work here, as in practice the possible values are 'false' or nil,
|
||||
-- both of which evaluate to false and the default value is true
|
||||
if boneMap["inheritScale"] == false then boneData.inheritScale = false else boneData.inheritScale = true end
|
||||
if boneMap["inheritRotation"] == false then boneData.inheritRotation = false else boneData.inheritRotation = true end
|
||||
table.insert(skeletonData.bones, boneData)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user