mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-05 02:06:53 +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 () {
|
AnimationState.prototype.clearTracks = function () {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||||
this.clearTrack(i);
|
this.clearTrack(i);
|
||||||
this.tracks.length = 0;
|
this.tracks.length = 0;
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||||
@ -1650,13 +1651,14 @@ var spine;
|
|||||||
return entry;
|
return entry;
|
||||||
};
|
};
|
||||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var current = this.tracks[i];
|
var current = this.tracks[i];
|
||||||
if (current != null)
|
if (current != null)
|
||||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||||
}
|
}
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.expandToIndex = function (index) {
|
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 () {
|
AnimationState.prototype.clearTracks = function () {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||||
this.clearTrack(i);
|
this.clearTrack(i);
|
||||||
this.tracks.length = 0;
|
this.tracks.length = 0;
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||||
@ -1650,13 +1651,14 @@ var spine;
|
|||||||
return entry;
|
return entry;
|
||||||
};
|
};
|
||||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var current = this.tracks[i];
|
var current = this.tracks[i];
|
||||||
if (current != null)
|
if (current != null)
|
||||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||||
}
|
}
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.expandToIndex = function (index) {
|
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 () {
|
AnimationState.prototype.clearTracks = function () {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||||
this.clearTrack(i);
|
this.clearTrack(i);
|
||||||
this.tracks.length = 0;
|
this.tracks.length = 0;
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||||
@ -1303,13 +1304,14 @@ var spine;
|
|||||||
return entry;
|
return entry;
|
||||||
};
|
};
|
||||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var current = this.tracks[i];
|
var current = this.tracks[i];
|
||||||
if (current != null)
|
if (current != null)
|
||||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||||
}
|
}
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.expandToIndex = function (index) {
|
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 () {
|
AnimationState.prototype.clearTracks = function () {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||||
this.clearTrack(i);
|
this.clearTrack(i);
|
||||||
this.tracks.length = 0;
|
this.tracks.length = 0;
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||||
@ -1303,13 +1304,14 @@ var spine;
|
|||||||
return entry;
|
return entry;
|
||||||
};
|
};
|
||||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var current = this.tracks[i];
|
var current = this.tracks[i];
|
||||||
if (current != null)
|
if (current != null)
|
||||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||||
}
|
}
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.expandToIndex = function (index) {
|
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 () {
|
AnimationState.prototype.clearTracks = function () {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||||
this.clearTrack(i);
|
this.clearTrack(i);
|
||||||
this.tracks.length = 0;
|
this.tracks.length = 0;
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||||
@ -1303,13 +1304,14 @@ var spine;
|
|||||||
return entry;
|
return entry;
|
||||||
};
|
};
|
||||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var current = this.tracks[i];
|
var current = this.tracks[i];
|
||||||
if (current != null)
|
if (current != null)
|
||||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||||
}
|
}
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.expandToIndex = function (index) {
|
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 () {
|
AnimationState.prototype.clearTracks = function () {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++)
|
for (var i = 0, n = this.tracks.length; i < n; i++)
|
||||||
this.clearTrack(i);
|
this.clearTrack(i);
|
||||||
this.tracks.length = 0;
|
this.tracks.length = 0;
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.clearTrack = function (trackIndex) {
|
AnimationState.prototype.clearTrack = function (trackIndex) {
|
||||||
@ -1303,13 +1304,14 @@ var spine;
|
|||||||
return entry;
|
return entry;
|
||||||
};
|
};
|
||||||
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
|
||||||
|
var oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
for (var i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
var current = this.tracks[i];
|
var current = this.tracks[i];
|
||||||
if (current != null)
|
if (current != null)
|
||||||
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||||
}
|
}
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
};
|
};
|
||||||
AnimationState.prototype.expandToIndex = function (index) {
|
AnimationState.prototype.expandToIndex = function (index) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -307,11 +307,12 @@ module spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clearTracks () {
|
clearTracks () {
|
||||||
|
let oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (let i = 0, n = this.tracks.length; i < n; i++)
|
for (let i = 0, n = this.tracks.length; i < n; i++)
|
||||||
this.clearTrack(i);
|
this.clearTrack(i);
|
||||||
this.tracks.length = 0;
|
this.tracks.length = 0;
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,12 +436,13 @@ module spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setEmptyAnimations (mixDuration: number) {
|
setEmptyAnimations (mixDuration: number) {
|
||||||
|
let oldDrainDisabled = this.queue.drainDisabled;
|
||||||
this.queue.drainDisabled = true;
|
this.queue.drainDisabled = true;
|
||||||
for (let i = 0, n = this.tracks.length; i < n; i++) {
|
for (let i = 0, n = this.tracks.length; i < n; i++) {
|
||||||
let current = this.tracks[i];
|
let current = this.tracks[i];
|
||||||
if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);
|
if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);
|
||||||
}
|
}
|
||||||
this.queue.drainDisabled = false;
|
this.queue.drainDisabled = oldDrainDisabled;
|
||||||
this.queue.drain();
|
this.queue.drain();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user