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
|
||||
socket.on('elements', function(arr) {
|
||||
|
||||
// Launch this code in async
|
||||
setTimeout(function() {
|
||||
|
||||
// We'll receive an array of string (obj)
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
|
||||
|
@ -93,6 +96,8 @@ var ProgressiveLoader = function(res, scene) {
|
|||
} else {
|
||||
console.log("Finished");
|
||||
}
|
||||
|
||||
},0);
|
||||
});
|
||||
|
||||
socket.on('finished', function(arg) {
|
||||
|
|
Loading…
Reference in New Issue