Reduce async loading from 0.25s to "when idle" and randomize load order
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
78d667bdec
commit
dba5c40f6a
@ -394,11 +394,11 @@
|
|||||||
|
|
||||||
/* Randomly index the visible array, keeping the center
|
/* Randomly index the visible array, keeping the center
|
||||||
* in the middle. This makes the loading look more organic. */
|
* in the middle. This makes the loading look more organic. */
|
||||||
for (var i = 0; i < visible.length >> 1; i++) {
|
for (var i = 0, j = visible.length - 1; i != j; i++, j--) {
|
||||||
if (Math.rand() > 0.5) {
|
if (Math.random() > 0.5) {
|
||||||
var tmp = visible[i];
|
var tmp = visible[i];
|
||||||
visible[i] = visible[visible.length - 1];
|
visible[i] = visible[j];
|
||||||
visible[visible.length - 1] = tmp;
|
visible[j] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user