Jelajahi Sumber

Update babylon.scene.ts

Finished animatables are removed in animatable._animate functio
Temechon 10 tahun lalu
induk
melakukan
168205ea5d
1 mengubah file dengan 2 tambahan dan 5 penghapusan
  1. 2 5
      Babylon/babylon.scene.ts

+ 2 - 5
Babylon/babylon.scene.ts

@@ -692,10 +692,7 @@
             var delay = now - this._animationStartDate;
 
             for (var index = 0; index < this._activeAnimatables.length; index++) {
-                if (!this._activeAnimatables[index]._animate(delay)) {
-                    this._activeAnimatables.splice(index, 1);
-                    index--;
-                }
+                this._activeAnimatables[index]._animate(delay);
             }
         }
 
@@ -2094,4 +2091,4 @@
             return this._getByTags(this.materials, tagsQuery, forEach).concat(this._getByTags(this.multiMaterials, tagsQuery, forEach));
         }
     }
-} 
+}