diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-01-05 18:10:35 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-01-05 18:10:35 +0100 |
commit | 3280ab57bffb3fa1018d406eb25a3d98564a51d7 (patch) | |
tree | 02c5d76d89b94b964a7cc005531c6c4427666bc0 /src/app.coffee | |
parent | b910818f176d009a9b98a419b645b6c7e1cb1d20 (diff) | |
download | rpgedit-3280ab57bffb3fa1018d406eb25a3d98564a51d7.tar rpgedit-3280ab57bffb3fa1018d406eb25a3d98564a51d7.zip |
Implement basic map rendering
Diffstat (limited to 'src/app.coffee')
-rw-r--r-- | src/app.coffee | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/app.coffee b/src/app.coffee index 08c8575..630fcfd 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -1,3 +1,20 @@ -lodash = require 'lodash' +'use strict' -document.write '<h1>Hello</h1>' +require './style.css' + + +Map = require './model/Map' +MapView = require './view/MapView' + + +mapView = null + + +window.onload = -> + xhr = new XMLHttpRequest() + xhr.onload = -> + mapDef = new Map(JSON.parse this.responseText) + mapView = new MapView mapDef, -> + + xhr.open 'GET', 'resources/map/test.json', true + xhr.send() |