Jelajahi Sumber

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 tahun lalu
induk
melakukan
b097cc1768
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  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;