summaryrefslogtreecommitdiffstats
path: root/src/app.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.ts')
-rw-r--r--src/app.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/app.ts b/src/app.ts
new file mode 100644
index 0000000..d1ca3cd
--- /dev/null
+++ b/src/app.ts
@@ -0,0 +1,26 @@
+'use strict';
+
+
+require('./style.css');
+
+
+import * as lodash from 'lodash';
+_ = lodash;
+
+import MapContext from './control/MapContext';
+import MapData from './model/MapData';
+
+
+var mapContext: MapContext;
+
+window.onload = () => {
+ var xhr = new XMLHttpRequest();
+
+ xhr.onload = function() {
+ let mapDef = new MapData(JSON.parse(this.responseText));
+ mapContext = new MapContext(mapDef);
+ }
+
+ xhr.open('GET', 'resources/map/test.json', true);
+ xhr.send();
+};