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