|
@@ -107,7 +107,6 @@
|
|
if (idx > -1) {
|
|
if (idx > -1) {
|
|
|
|
|
|
var animations = this._animations;
|
|
var animations = this._animations;
|
|
- var numberOfAnimationsStopped = 0;
|
|
|
|
|
|
|
|
for (var index = animations.length - 1; index >= 0; index--) {
|
|
for (var index = animations.length - 1; index >= 0; index--) {
|
|
if (typeof animationName === "string" && animations[index].name != animationName) {
|
|
if (typeof animationName === "string" && animations[index].name != animationName) {
|
|
@@ -116,10 +115,9 @@
|
|
|
|
|
|
animations[index].reset();
|
|
animations[index].reset();
|
|
animations.splice(index, 1);
|
|
animations.splice(index, 1);
|
|
- numberOfAnimationsStopped++;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if (animations.length == numberOfAnimationsStopped) {
|
|
|
|
|
|
+ if (animations.length == 0) {
|
|
this._scene._activeAnimatables.splice(idx, 1);
|
|
this._scene._activeAnimatables.splice(idx, 1);
|
|
|
|
|
|
if (this.onAnimationEnd) {
|
|
if (this.onAnimationEnd) {
|
|
@@ -191,4 +189,4 @@
|
|
return running;
|
|
return running;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|