mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Minor cleanup.
This commit is contained in:
parent
37035c4a0f
commit
8fca7bf3ba
@ -82,10 +82,16 @@ function SkeletonJson.new (attachmentLoader)
|
|||||||
boneData.rotation = (boneMap["rotation"] or 0)
|
boneData.rotation = (boneMap["rotation"] or 0)
|
||||||
boneData.scaleX = (boneMap["scaleX"] or 1)
|
boneData.scaleX = (boneMap["scaleX"] or 1)
|
||||||
boneData.scaleY = (boneMap["scaleY"] 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,
|
if boneMap["inheritScale"] == false then
|
||||||
-- both of which evaluate to false and the default value is true
|
boneData.inheritScale = false
|
||||||
if boneMap["inheritScale"] == false then boneData.inheritScale = false else boneData.inheritScale = true end
|
else
|
||||||
if boneMap["inheritRotation"] == false then boneData.inheritRotation = false else boneData.inheritRotation = true end
|
boneData.inheritScale = true
|
||||||
|
end
|
||||||
|
if boneMap["inheritRotation"] == false then
|
||||||
|
boneData.inheritRotation = false
|
||||||
|
else
|
||||||
|
boneData.inheritRotation = true
|
||||||
|
end
|
||||||
table.insert(skeletonData.bones, boneData)
|
table.insert(skeletonData.bones, boneData)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user