mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49: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.
@ -552,13 +552,9 @@ package spine.animation {
|
|||||||
|
|
||||||
var propertyIDs : Dictionary = this.propertyIDs = new Dictionary();
|
var propertyIDs : Dictionary = this.propertyIDs = new Dictionary();
|
||||||
var mixingTo : Vector.<TrackEntry> = this.mixingTo;
|
var mixingTo : Vector.<TrackEntry> = this.mixingTo;
|
||||||
var lastEntry : TrackEntry = null;
|
|
||||||
for (var i : int = 0, n : int = tracks.length; i < n; i++) {
|
for (var i : int = 0, n : int = tracks.length; i < n; i++) {
|
||||||
var entry : TrackEntry = tracks[i];
|
var entry : TrackEntry = tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null) entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -801,7 +801,6 @@ void _spAnimationState_animationsChanged (spAnimationState* self) {
|
|||||||
_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
|
_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
|
||||||
int i, n;
|
int i, n;
|
||||||
spTrackEntry* entry;
|
spTrackEntry* entry;
|
||||||
spTrackEntry* lastEntry = 0;
|
|
||||||
spTrackEntryArray* mixingTo;
|
spTrackEntryArray* mixingTo;
|
||||||
internal->animationsChanged = 0;
|
internal->animationsChanged = 0;
|
||||||
|
|
||||||
@ -812,10 +811,7 @@ void _spAnimationState_animationsChanged (spAnimationState* self) {
|
|||||||
|
|
||||||
for (;i < n; i++) {
|
for (;i < n; i++) {
|
||||||
entry = self->tracks[i];
|
entry = self->tracks[i];
|
||||||
if (entry != 0) {
|
if (entry != 0) _spTrackEntry_setTimelineData(entry, 0, mixingTo, self);
|
||||||
_spTrackEntry_setTimelineData(entry, lastEntry, mixingTo, self);
|
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -804,17 +804,15 @@ function AnimationState:disposeNext (entry)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function AnimationState:_animationsChanged ()
|
function AnimationState:_animationsChanged ()
|
||||||
self.animationsChanged = false
|
self.animationsChanged = false
|
||||||
|
|
||||||
self.propertyIDs = {}
|
self.propertyIDs = {}
|
||||||
local propertyIDs = self.propertyIDs
|
local propertyIDs = self.propertyIDs
|
||||||
local mixingTo = self.mixingTo
|
local mixingTo = self.mixingTo
|
||||||
|
|
||||||
local lastEntry = nil
|
|
||||||
for i, entry in pairs(self.tracks) do
|
for i, entry in pairs(self.tracks) do
|
||||||
if entry then
|
if entry then
|
||||||
entry:setTimelineData(lastEntry, mixingTo, propertyIDs)
|
entry:setTimelineData(nil, mixingTo, propertyIDs)
|
||||||
lastEntry = entry
|
|
||||||
end
|
end
|
||||||
end
|
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(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(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(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(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(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);
|
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;
|
var propertyIDs = this.propertyIDs;
|
||||||
propertyIDs.clear();
|
propertyIDs.clear();
|
||||||
var mixingTo = this.mixingTo;
|
var mixingTo = this.mixingTo;
|
||||||
var lastEntry = null;
|
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var entry = this.tracks[i];
|
var entry = this.tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null)
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
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;
|
var propertyIDs = this.propertyIDs;
|
||||||
propertyIDs.clear();
|
propertyIDs.clear();
|
||||||
var mixingTo = this.mixingTo;
|
var mixingTo = this.mixingTo;
|
||||||
var lastEntry = null;
|
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var entry = this.tracks[i];
|
var entry = this.tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null)
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
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;
|
var propertyIDs = this.propertyIDs;
|
||||||
propertyIDs.clear();
|
propertyIDs.clear();
|
||||||
var mixingTo = this.mixingTo;
|
var mixingTo = this.mixingTo;
|
||||||
var lastEntry = null;
|
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var entry = this.tracks[i];
|
var entry = this.tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null)
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
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;
|
var propertyIDs = this.propertyIDs;
|
||||||
propertyIDs.clear();
|
propertyIDs.clear();
|
||||||
var mixingTo = this.mixingTo;
|
var mixingTo = this.mixingTo;
|
||||||
var lastEntry = null;
|
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var entry = this.tracks[i];
|
var entry = this.tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null)
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
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;
|
var propertyIDs = this.propertyIDs;
|
||||||
propertyIDs.clear();
|
propertyIDs.clear();
|
||||||
var mixingTo = this.mixingTo;
|
var mixingTo = this.mixingTo;
|
||||||
var lastEntry = null;
|
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var entry = this.tracks[i];
|
var entry = this.tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null)
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
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;
|
var propertyIDs = this.propertyIDs;
|
||||||
propertyIDs.clear();
|
propertyIDs.clear();
|
||||||
var mixingTo = this.mixingTo;
|
var mixingTo = this.mixingTo;
|
||||||
var lastEntry = null;
|
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var entry = this.tracks[i];
|
var entry = this.tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null)
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
AnimationState.prototype.getCurrent = function (trackIndex) {
|
AnimationState.prototype.getCurrent = function (trackIndex) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -540,13 +540,9 @@ module spine {
|
|||||||
propertyIDs.clear();
|
propertyIDs.clear();
|
||||||
let mixingTo = this.mixingTo;
|
let mixingTo = this.mixingTo;
|
||||||
|
|
||||||
let lastEntry: TrackEntry = null;
|
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
let entry = this.tracks[i];
|
let entry = this.tracks[i];
|
||||||
if (entry != null) {
|
if (entry != null) entry.setTimelineData(null, mixingTo, propertyIDs);
|
||||||
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
|
|
||||||
lastEntry = entry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user