mrdoob/three.js — Issue #1388: creating objects in init() loop | Jquery freeze?
Author: zsitro
Created: 2012-02-24 10:47:12+00:00
State: open

Hi, I have a FOR loop in the init() method to create objects/load materials/etc, and its take a while (~10-20sec) and I want to add a " 2 loaded/ 30 total" style info box to the DOM while loading. So I put these

$("#preloader").text(i+"/"+worker.length);
console.log(i+"/"+worker.length);

lines to the beginning of the FOR loop to show the user how many items remaining.

Result: the console log is shown as expected (each after another), but the DOM content didnt change until the scene loaded.
How can I solve this problem?

Any other solution?