move _callback() call
This commit is contained in:
parent
d7596cc3fa
commit
42311a0275
@ -23,12 +23,13 @@ function loadData(_callback) {
|
|||||||
xmlhttp.onreadystatechange = function() {
|
xmlhttp.onreadystatechange = function() {
|
||||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||||
jsonEmpire = JSON.parse(xmlhttp.responseText);
|
jsonEmpire = JSON.parse(xmlhttp.responseText);
|
||||||
|
_callback();
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xmlhttp.open("GET", url, true);
|
xmlhttp.open("GET", url, true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
_callback();
|
|
||||||
}
|
}
|
||||||
function init() {
|
function init() {
|
||||||
scene = new THREE.Scene();
|
scene = new THREE.Scene();
|
||||||
|
Loading…
Reference in New Issue
Block a user