blob: e47d41f9e743916ef0df023b06fa24b79befb0b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
'use strict';
require('./style.css');
import * as lodash from 'lodash';
_ = lodash;
import MapContext from './control/MapContext';
import MapData from './model/MapData';
import InputHandler from './view/InputHandler';
var mapContext: MapContext;
window.onload = () => {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var mapDef = new MapData(JSON.parse(this.responseText));
var inputHandler = new InputHandler();
mapContext = new MapContext(mapDef, inputHandler);
}
xhr.open('GET', 'resources/map/test.json', true);
xhr.send();
};
|