mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[ts] Fix for clearTracks, see #805
This commit is contained in:
parent
fe33e912c6
commit
05ba66efe0
@ -1534,11 +1534,12 @@ var spine;
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.clearTracks = function () {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||
this.clearTrack(i);
|
||||
this.tracks.length = 0;
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||
@ -1650,13 +1651,14 @@ var spine;
|
||||
return entry;
|
||||
};
|
||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var current = this.tracks[i];
|
||||
if (current != null)
|
||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.expandToIndex = function (index) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1534,11 +1534,12 @@ var spine;
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.clearTracks = function () {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||
this.clearTrack(i);
|
||||
this.tracks.length = 0;
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||
@ -1650,13 +1651,14 @@ var spine;
|
||||
return entry;
|
||||
};
|
||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var current = this.tracks[i];
|
||||
if (current != null)
|
||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.expandToIndex = function (index) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1187,11 +1187,12 @@ var spine;
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.clearTracks = function () {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||
this.clearTrack(i);
|
||||
this.tracks.length = 0;
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||
@ -1303,13 +1304,14 @@ var spine;
|
||||
return entry;
|
||||
};
|
||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var current = this.tracks[i];
|
||||
if (current != null)
|
||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.expandToIndex = function (index) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1187,11 +1187,12 @@ var spine;
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.clearTracks = function () {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||
this.clearTrack(i);
|
||||
this.tracks.length = 0;
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||
@ -1303,13 +1304,14 @@ var spine;
|
||||
return entry;
|
||||
};
|
||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var current = this.tracks[i];
|
||||
if (current != null)
|
||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.expandToIndex = function (index) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1187,11 +1187,12 @@ var spine;
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.clearTracks = function () {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||
this.clearTrack(i);
|
||||
this.tracks.length = 0;
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||
@ -1303,13 +1304,14 @@ var spine;
|
||||
return entry;
|
||||
};
|
||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var current = this.tracks[i];
|
||||
if (current != null)
|
||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.expandToIndex = function (index) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1187,11 +1187,12 @@ var spine;
|
||||
}
|
||||
};
|
||||
AnimationState.prototype.clearTracks = function () {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||
this.clearTrack(i);
|
||||
this.tracks.length = 0;
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||
@ -1303,13 +1304,14 @@ var spine;
|
||||
return entry;
|
||||
};
|
||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||
var oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||
var current = this.tracks[i];
|
||||
if (current != null)
|
||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
};
|
||||
AnimationState.prototype.expandToIndex = function (index) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -307,11 +307,12 @@ module spine {
|
||||
}
|
||||
|
||||
clearTracks () {
|
||||
let oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (let i = 0, n = this.tracks.length; i < n; i++)
|
||||
this.clearTrack(i);
|
||||
this.tracks.length = 0;
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
}
|
||||
|
||||
@ -435,12 +436,13 @@ module spine {
|
||||
}
|
||||
|
||||
setEmptyAnimations (mixDuration: number) {
|
||||
let oldDrainDisabled = this.queue.drainDisabled;
|
||||
this.queue.drainDisabled = true;
|
||||
for (let i = 0, n = this.tracks.length; i < n; i++) {
|
||||
let current = this.tracks[i];
|
||||
if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
this.queue.drainDisabled = false;
|
||||
this.queue.drainDisabled = oldDrainDisabled;
|
||||
this.queue.drain();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user