move JSON load back to top.
This commit is contained in:
parent
463e4fba9f
commit
8abf0adcb9
@ -1,19 +1,5 @@
|
|||||||
|
|
||||||
if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
|
if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
|
||||||
var camera, controls, scene, renderer;
|
|
||||||
var canvas_t=[];
|
|
||||||
var context_t=[];
|
|
||||||
var clock = new THREE.Clock();
|
|
||||||
var WIDTH = window.innerWidth , HEIGHT = window.innerHeight
|
|
||||||
|
|
||||||
window.onload = function() {
|
|
||||||
init();
|
|
||||||
animate();
|
|
||||||
render();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
// Load Data
|
// Load Data
|
||||||
var xmlhttp = new XMLHttpRequest();
|
var xmlhttp = new XMLHttpRequest();
|
||||||
var url = "js/empiredata.json";
|
var url = "js/empiredata.json";
|
||||||
@ -28,6 +14,21 @@ function init() {
|
|||||||
xmlhttp.open("GET", url, true);
|
xmlhttp.open("GET", url, true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
|
|
||||||
|
|
||||||
|
var camera, controls, scene, renderer;
|
||||||
|
var canvas_t=[];
|
||||||
|
var context_t=[];
|
||||||
|
var clock = new THREE.Clock();
|
||||||
|
var WIDTH = window.innerWidth , HEIGHT = window.innerHeight
|
||||||
|
|
||||||
|
window.onload = function() {
|
||||||
|
init();
|
||||||
|
animate();
|
||||||
|
render();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function init() {
|
||||||
scene = new THREE.Scene();
|
scene = new THREE.Scene();
|
||||||
//scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
|
//scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
|
||||||
renderer = new THREE.WebGLRenderer();
|
renderer = new THREE.WebGLRenderer();
|
||||||
|
Loading…
Reference in New Issue
Block a user