mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[c][lua][as3][ts] Don't use DIP_MIX across tracks. Closes #931
This commit is contained in:
parent
fdee465333
commit
c6fefe8fa0
Binary file not shown.
@ -551,14 +551,10 @@ package spine.animation {
|
||||
animationsChanged = false;
|
||||
|
||||
var propertyIDs : Dictionary = this.propertyIDs = new Dictionary();
|
||||
var mixingTo : Vector.<TrackEntry> = this.mixingTo;
|
||||
var lastEntry : TrackEntry = null;
|
||||
var mixingTo : Vector.<TrackEntry> = this.mixingTo;
|
||||
for (var i : int = 0, n : int = tracks.length; i < n; i++) {
|
||||
var entry : TrackEntry = tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null) entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -801,7 +801,6 @@ void _spAnimationState_animationsChanged (spAnimationState* self) {
|
||||
_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
|
||||
int i, n;
|
||||
spTrackEntry* entry;
|
||||
spTrackEntry* lastEntry = 0;
|
||||
spTrackEntryArray* mixingTo;
|
||||
internal->animationsChanged = 0;
|
||||
|
||||
@ -812,10 +811,7 @@ void _spAnimationState_animationsChanged (spAnimationState* self) {
|
||||
|
||||
for (;i < n; i++) {
|
||||
entry = self->tracks[i];
|
||||
if (entry != 0) {
|
||||
_spTrackEntry_setTimelineData(entry, lastEntry, mixingTo, self);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != 0) _spTrackEntry_setTimelineData(entry, 0, mixingTo, self);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -804,17 +804,15 @@ function AnimationState:disposeNext (entry)
|
||||
end
|
||||
|
||||
function AnimationState:_animationsChanged ()
|
||||
self.animationsChanged = false
|
||||
self.animationsChanged = false
|
||||
|
||||
self.propertyIDs = {}
|
||||
local propertyIDs = self.propertyIDs
|
||||
self.propertyIDs = {}
|
||||
local propertyIDs = self.propertyIDs
|
||||
local mixingTo = self.mixingTo
|
||||
|
||||
local lastEntry = nil
|
||||
|
||||
for i, entry in pairs(self.tracks) do
|
||||
if entry then
|
||||
entry:setTimelineData(lastEntry, mixingTo, propertyIDs)
|
||||
lastEntry = entry
|
||||
entry:setTimelineData(nil, mixingTo, propertyIDs)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -396,7 +396,7 @@ int main () {
|
||||
testcase(test, "data/tank-pro.json", "data/tank-pro.skel", "data/tank.atlas", 1.0f);
|
||||
testcase(coin, "data/coin-pro.json", "data/coin-pro.skel", "data/coin.atlas", 0.5f);
|
||||
testcase(vine, "data/vine-pro.json", "data/vine-pro.skel", "data/vine.atlas", 0.5f);
|
||||
testcase(tank, "data/tank-pro.json", "data/tank-pro.skel", "data/tank.atlas", 0.2f);*/
|
||||
testcase(tank, "data/tank-pro.json", "data/tank-pro.skel", "data/tank.atlas", 0.2f);
|
||||
testcase(raptor, "data/raptor-pro.json", "data/raptor-pro.skel", "data/raptor.atlas", 0.5f);
|
||||
testcase(spineboy, "data/spineboy-ess.json", "data/spineboy-ess.skel", "data/spineboy.atlas", 0.6f);
|
||||
testcase(goblins, "data/goblins-pro.json", "data/goblins-pro.skel", "data/goblins.atlas", 1.4f);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1581,13 +1581,10 @@ var spine;
|
||||
var propertyIDs = this.propertyIDs;
|
||||
propertyIDs.clear();
|
||||
var mixingTo = this.mixingTo;
|
||||
var lastEntry = null;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var entry = this.tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null)
|
||||
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1581,13 +1581,10 @@ var spine;
|
||||
var propertyIDs = this.propertyIDs;
|
||||
propertyIDs.clear();
|
||||
var mixingTo = this.mixingTo;
|
||||
var lastEntry = null;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var entry = this.tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null)
|
||||
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1581,13 +1581,10 @@ var spine;
|
||||
var propertyIDs = this.propertyIDs;
|
||||
propertyIDs.clear();
|
||||
var mixingTo = this.mixingTo;
|
||||
var lastEntry = null;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var entry = this.tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null)
|
||||
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1581,13 +1581,10 @@ var spine;
|
||||
var propertyIDs = this.propertyIDs;
|
||||
propertyIDs.clear();
|
||||
var mixingTo = this.mixingTo;
|
||||
var lastEntry = null;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var entry = this.tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null)
|
||||
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1581,13 +1581,10 @@ var spine;
|
||||
var propertyIDs = this.propertyIDs;
|
||||
propertyIDs.clear();
|
||||
var mixingTo = this.mixingTo;
|
||||
var lastEntry = null;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var entry = this.tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null)
|
||||
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1581,13 +1581,10 @@ var spine;
|
||||
var propertyIDs = this.propertyIDs;
|
||||
propertyIDs.clear();
|
||||
var mixingTo = this.mixingTo;
|
||||
var lastEntry = null;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var entry = this.tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null)
|
||||
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -208,7 +208,7 @@ module spine {
|
||||
let firstFrame = from.timelinesRotation.length == 0;
|
||||
if (firstFrame) Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
|
||||
let timelinesRotation = from.timelinesRotation;
|
||||
|
||||
|
||||
let pose: MixPose;
|
||||
let alphaDip = from.alpha * to.interruptAlpha, alphaMix = alphaDip * (1 - mix), alpha = 0;
|
||||
from.totalAlpha = 0;
|
||||
@ -239,7 +239,7 @@ module spine {
|
||||
from.totalAlpha += alpha;
|
||||
if (timeline instanceof RotateTimeline)
|
||||
this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i << 1, firstFrame);
|
||||
else {
|
||||
else {
|
||||
timeline.apply(skeleton, animationLast, animationTime, events, alpha, pose, MixDirection.out);
|
||||
}
|
||||
}
|
||||
@ -540,13 +540,9 @@ module spine {
|
||||
propertyIDs.clear();
|
||||
let mixingTo = this.mixingTo;
|
||||
|
||||
let lastEntry: TrackEntry = null;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
let entry = this.tracks[i];
|
||||
if (entry != null) {
|
||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
||||
lastEntry = entry;
|
||||
}
|
||||
if (entry != null) entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user