mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 10:16:01 +08:00
Merge branch '3.6' into 3.7-beta
This commit is contained in:
commit
e406c140be
Binary file not shown.
@ -346,6 +346,9 @@ function AnimationState:updateMixingFrom (to, delta)
|
|||||||
|
|
||||||
local finished = self:updateMixingFrom(from, delta)
|
local finished = self:updateMixingFrom(from, delta)
|
||||||
|
|
||||||
|
from.animationLast = from.nextAnimationLast
|
||||||
|
from.trackLast = from.nextTrackLast
|
||||||
|
|
||||||
-- Require mixTime > 0 to ensure the mixing from entry was applied at least once.
|
-- Require mixTime > 0 to ensure the mixing from entry was applied at least once.
|
||||||
if (to.mixTime > 0 and (to.mixTime >= to.mixDuration or to.timeScale == 0)) then
|
if (to.mixTime > 0 and (to.mixTime >= to.mixDuration or to.timeScale == 0)) then
|
||||||
-- Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
|
-- Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
|
||||||
@ -357,8 +360,6 @@ function AnimationState:updateMixingFrom (to, delta)
|
|||||||
return finished
|
return finished
|
||||||
end
|
end
|
||||||
|
|
||||||
from.animationLast = from.nextAnimationLast
|
|
||||||
from.trackLast = from.nextTrackLast
|
|
||||||
from.trackTime = from.trackTime + delta * from.timeScale
|
from.trackTime = from.trackTime + delta * from.timeScale
|
||||||
to.mixTime = to.mixTime + delta * to.timeScale
|
to.mixTime = to.mixTime + delta * to.timeScale
|
||||||
return false;
|
return false;
|
||||||
@ -376,6 +377,7 @@ function AnimationState:apply (skeleton)
|
|||||||
for i,current in pairs(tracks) do
|
for i,current in pairs(tracks) do
|
||||||
if not (current == nil or current.delay > 0) then
|
if not (current == nil or current.delay > 0) then
|
||||||
applied = true
|
applied = true
|
||||||
|
<<<<<<< HEAD
|
||||||
local blend = current.mixBlend
|
local blend = current.mixBlend
|
||||||
if i == 0 then blend = MixBlend.first end
|
if i == 0 then blend = MixBlend.first end
|
||||||
|
|
||||||
@ -383,6 +385,15 @@ function AnimationState:apply (skeleton)
|
|||||||
local mix = current.alpha
|
local mix = current.alpha
|
||||||
if current.mixingFrom then
|
if current.mixingFrom then
|
||||||
mix = mix * self:applyMixingFrom(current, skeleton, blend)
|
mix = mix * self:applyMixingFrom(current, skeleton, blend)
|
||||||
|
=======
|
||||||
|
local currrentPose = MixPose.currentLayered
|
||||||
|
if i == 0 then currentPose = MixPose.current end
|
||||||
|
|
||||||
|
-- Apply mixing from entries first.
|
||||||
|
local mix = current.alpha
|
||||||
|
if current.mixingFrom then
|
||||||
|
mix = mix * self:applyMixingFrom(current, skeleton, currentPose)
|
||||||
|
>>>>>>> 3.6
|
||||||
elseif current.trackTime >= current.trackEnd and current.next == nil then
|
elseif current.trackTime >= current.trackEnd and current.next == nil then
|
||||||
mix = 0
|
mix = 0
|
||||||
end
|
end
|
||||||
@ -401,9 +412,15 @@ function AnimationState:apply (skeleton)
|
|||||||
local timelinesRotation = current.timelinesRotation
|
local timelinesRotation = current.timelinesRotation
|
||||||
|
|
||||||
for i,timeline in ipairs(timelines) do
|
for i,timeline in ipairs(timelines) do
|
||||||
|
<<<<<<< HEAD
|
||||||
local timelineBlend = MixBlend.setup
|
local timelineBlend = MixBlend.setup
|
||||||
if timelineData[i] == SUBSEQUENT then timelineBlend = blend end
|
if timelineData[i] == SUBSEQUENT then timelineBlend = blend end
|
||||||
|
|
||||||
|
=======
|
||||||
|
local pose = MixPose.currentPose
|
||||||
|
if timelineData[i] >= FIRST then pose = MixPose.setup end
|
||||||
|
|
||||||
|
>>>>>>> 3.6
|
||||||
if timeline.type == Animation.TimelineType.rotate then
|
if timeline.type == Animation.TimelineType.rotate then
|
||||||
self:applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, i * 2,
|
self:applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, i * 2,
|
||||||
firstFrame) -- FIXME passing ii * 2, indexing correct?
|
firstFrame) -- FIXME passing ii * 2, indexing correct?
|
||||||
@ -451,6 +468,7 @@ function AnimationState:applyMixingFrom (to, skeleton, blend)
|
|||||||
for i,timeline in ipairs(timelines) do
|
for i,timeline in ipairs(timelines) do
|
||||||
timeline:apply(skeleton, animationLast, animationTime, events, alphaMix, blend, MixDirection.out)
|
timeline:apply(skeleton, animationLast, animationTime, events, alphaMix, blend, MixDirection.out)
|
||||||
end
|
end
|
||||||
|
<<<<<<< HEAD
|
||||||
else
|
else
|
||||||
local timelineData = from.timelineData
|
local timelineData = from.timelineData
|
||||||
local timelineDipMix = from.timelineDipMix
|
local timelineDipMix = from.timelineDipMix
|
||||||
@ -475,6 +493,13 @@ function AnimationState:applyMixingFrom (to, skeleton, blend)
|
|||||||
elseif timelineData[i] == DIP then
|
elseif timelineData[i] == DIP then
|
||||||
timelineBlend = MixBlend.setup
|
timelineBlend = MixBlend.setup
|
||||||
alpha = alphaDip
|
alpha = alphaDip
|
||||||
|
=======
|
||||||
|
|
||||||
|
if not skipSubsequent then
|
||||||
|
from.totalAlpha = from.totalAlpha + alpha
|
||||||
|
if timeline.type == Animation.TimelineType.rotate then
|
||||||
|
self:applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i * 2, firstFrame)
|
||||||
|
>>>>>>> 3.6
|
||||||
else
|
else
|
||||||
timelineBlend = MixBlend.setup
|
timelineBlend = MixBlend.setup
|
||||||
local dipMix = timelineDipMix[i]
|
local dipMix = timelineDipMix[i]
|
||||||
@ -500,8 +525,13 @@ function AnimationState:applyMixingFrom (to, skeleton, blend)
|
|||||||
return mix
|
return mix
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
function AnimationState:applyRotateTimeline (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame)
|
function AnimationState:applyRotateTimeline (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame)
|
||||||
if firstFrame then
|
if firstFrame then
|
||||||
|
=======
|
||||||
|
function AnimationState:applyRotateTimeline (timeline, skeleton, time, alpha, pose, timelinesRotation, i, firstFrame)
|
||||||
|
if firstFrame then
|
||||||
|
>>>>>>> 3.6
|
||||||
timelinesRotation[i] = 0
|
timelinesRotation[i] = 0
|
||||||
timelinesRotation[i+1] = 0
|
timelinesRotation[i+1] = 0
|
||||||
end
|
end
|
||||||
@ -828,8 +858,13 @@ function AnimationState:_animationsChanged ()
|
|||||||
local mixingTo = self.mixingTo
|
local mixingTo = self.mixingTo
|
||||||
|
|
||||||
for i, entry in pairs(self.tracks) do
|
for i, entry in pairs(self.tracks) do
|
||||||
|
<<<<<<< HEAD
|
||||||
if entry and (i == 0 or entry.mixBlend ~= MixBlend.add) then
|
if entry and (i == 0 or entry.mixBlend ~= MixBlend.add) then
|
||||||
entry:setTimelineData(nil, mixingTo, propertyIDs)
|
entry:setTimelineData(nil, mixingTo, propertyIDs)
|
||||||
|
=======
|
||||||
|
if entry then
|
||||||
|
entry:setTimelineData(nil, mixingTo, propertyIDs)
|
||||||
|
>>>>>>> 3.6
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user