Explorar o código

Fix #5691 - After loading a scene, animations don't run because of additional data being loaded

Harold Martinez %!s(int64=6) %!d(string=hai) anos
pai
achega
9fce1fe136
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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;