mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[lua] Port of additive scale mixing fix, see #2028
This commit is contained in:
parent
65c62bff06
commit
eff8b372f7
@ -566,8 +566,8 @@ function Animation.ScaleTimeline.new (frameCount, bezierCount, boneIndex)
|
||||
bone.scaleX = bx + (math_abs(x) * math_signum(bx) - bx) * alpha
|
||||
bone.scaleY = by + (math_abs(y) * math_signum(by) - by) * alpha
|
||||
elseif blend == MixBlend.add then
|
||||
bone.scaleX = (x - bone.data.scaleX) * alpha
|
||||
bone.scaleY = (y - bone.data.scaleY) * alpha
|
||||
bone.scaleX = bone.scaleX + (x - bone.data.scaleX) * alpha
|
||||
bone.scaleY = bone.scaleY + (y - bone.data.scaleY) * alpha
|
||||
end
|
||||
else
|
||||
if blend == MixBlend.setup then
|
||||
@ -627,7 +627,7 @@ function Animation.ScaleXTimeline.new (frameCount, bezierCount, boneIndex)
|
||||
bx = bone.scaleX
|
||||
bone.scaleX = bx + (math_abs(x) * math_signum(bx) - bx) * alpha
|
||||
elseif blend == MixBlend.add then
|
||||
bone.scaleX = (x - bone.data.scaleX) * alpha
|
||||
bone.scaleX = bone.scaleX + (x - bone.data.scaleX) * alpha
|
||||
end
|
||||
else
|
||||
if blend == MixBlend.setup then
|
||||
@ -682,7 +682,7 @@ function Animation.ScaleYTimeline.new (frameCount, bezierCount, boneIndex)
|
||||
by = bone.scaleY
|
||||
bone.scaleY = by + (math_abs(y) * math_signum(by) - by) * alpha
|
||||
elseif blend == MixBlend.add then
|
||||
bone.scaleY = (y - bone.data.scaleY) * alpha
|
||||
bone.scaleY = bone.scaleY + (y - bone.data.scaleY) * alpha
|
||||
end
|
||||
else
|
||||
if blend == MixBlend.setup then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user