فهرست منبع

Executing the AsyncLoop first iteration.

Raanan Weber 10 سال پیش
والد
کامیت
85b1227bcf
4فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 1
      Babylon/Mesh/babylon.mesh.js
  2. 1 1
      Babylon/Mesh/babylon.mesh.ts
  3. 1 1
      Babylon/Tools/babylon.tools.js
  4. 1 1
      Babylon/Tools/babylon.tools.ts

+ 1 - 1
Babylon/Mesh/babylon.mesh.js

@@ -1043,7 +1043,7 @@ var BABYLON;
                     });
                     });
                 };
                 };
 
 
-                var asyncLoop = new BABYLON.AsyncLoop(settings.length, function (loop) {
+                BABYLON.AsyncLoop.Run(settings.length, function (loop) {
                     runDecimation(settings[loop.index], function () {
                     runDecimation(settings[loop.index], function () {
                         loop.executeNext();
                         loop.executeNext();
                     });
                     });

+ 1 - 1
Babylon/Mesh/babylon.mesh.ts

@@ -1047,7 +1047,7 @@
                     });
                     });
                 }
                 }
 
 
-                var asyncLoop = new AsyncLoop(settings.length, (loop : AsyncLoop) => {
+                AsyncLoop.Run(settings.length, (loop : AsyncLoop) => {
                     runDecimation(settings[loop.index], () => {
                     runDecimation(settings[loop.index], () => {
                             loop.executeNext();
                             loop.executeNext();
                         });
                         });

+ 1 - 1
Babylon/Tools/babylon.tools.js

@@ -869,7 +869,7 @@
         */
         */
         AsyncLoop.SyncAsyncForLoop = function (iterations, syncedIterations, fn, callback, breakFunction, timeout) {
         AsyncLoop.SyncAsyncForLoop = function (iterations, syncedIterations, fn, callback, breakFunction, timeout) {
             if (typeof timeout === "undefined") { timeout = 0; }
             if (typeof timeout === "undefined") { timeout = 0; }
-            var asyncLoop = new AsyncLoop(Math.ceil(iterations / syncedIterations), function (loop) {
+            AsyncLoop.Run(Math.ceil(iterations / syncedIterations), function (loop) {
                 if (breakFunction && breakFunction())
                 if (breakFunction && breakFunction())
                     loop.breakLoop();
                     loop.breakLoop();
                 else {
                 else {

+ 1 - 1
Babylon/Tools/babylon.tools.ts

@@ -852,7 +852,7 @@
          * @constructor
          * @constructor
          */
          */
         public static SyncAsyncForLoop(iterations: number, syncedIterations: number, fn: (iteration: number) => void, callback: () => void, breakFunction?: () => boolean, timeout: number = 0) {
         public static SyncAsyncForLoop(iterations: number, syncedIterations: number, fn: (iteration: number) => void, callback: () => void, breakFunction?: () => boolean, timeout: number = 0) {
-            var asyncLoop = new AsyncLoop(Math.ceil(iterations / syncedIterations), (loop: AsyncLoop) => {
+            AsyncLoop.Run(Math.ceil(iterations / syncedIterations), (loop: AsyncLoop) => {
                 if (breakFunction && breakFunction()) loop.breakLoop();
                 if (breakFunction && breakFunction()) loop.breakLoop();
                 else {
                 else {
                     setTimeout(() => {
                     setTimeout(() => {