Put in some async
This commit is contained in:
parent
821ca9ef10
commit
44939959f6
|
@ -26,6 +26,9 @@ var ProgressiveLoader = function(res, scene) {
|
||||||
// When receiving elements
|
// When receiving elements
|
||||||
socket.on('elements', function(arr) {
|
socket.on('elements', function(arr) {
|
||||||
|
|
||||||
|
// Launch this code in async
|
||||||
|
setTimeout(function() {
|
||||||
|
|
||||||
// We'll receive an array of string (obj)
|
// We'll receive an array of string (obj)
|
||||||
for (var i = 0; i < arr.length; i++) {
|
for (var i = 0; i < arr.length; i++) {
|
||||||
|
|
||||||
|
@ -93,6 +96,8 @@ var ProgressiveLoader = function(res, scene) {
|
||||||
} else {
|
} else {
|
||||||
console.log("Finished");
|
console.log("Finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},0);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('finished', function(arg) {
|
socket.on('finished', function(arg) {
|
||||||
|
|
Loading…
Reference in New Issue