Просмотр исходного кода

Merge pull request #5692 from haroldma/master

Fix #5691 - After loading a scene, animations don't run because of additional data being loaded
David Catuhe 6 лет назад
Родитель
Сommit
b097cc1768
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/babylon.scene.ts

+ 8 - 0
src/babylon.scene.ts

@@ -2653,6 +2653,14 @@ module BABYLON {
             }
         }
 
+        /**
+         * Resets the last animation time frame.
+         * Useful to override when animations start running when loading a scene for the first time.
+         */
+        public resetLastAnimationTimeFrame(): void {
+            this._animationTimeLast = BABYLON.Tools.Now;
+        }
+
         private _animate(): void {
             if (!this.animationsEnabled || this._activeAnimatables.length === 0) {
                 return;