@@ -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 () {
loop.executeNext();
@@ -1047,7 +1047,7 @@
}
- var asyncLoop = new AsyncLoop(settings.length, (loop : AsyncLoop) => {
+ AsyncLoop.Run(settings.length, (loop : AsyncLoop) => {
runDecimation(settings[loop.index], () => {
@@ -869,7 +869,7 @@
*/
AsyncLoop.SyncAsyncForLoop = function (iterations, syncedIterations, fn, callback, breakFunction, timeout) {
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())
loop.breakLoop();
else {
@@ -852,7 +852,7 @@
* @constructor
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();
setTimeout(() => {