mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 02:58:44 +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.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
|
||||
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