diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-04-18 17:39:14 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-04-18 17:39:14 -0400 |
| commit | 0a7a3a60b15d9bd6cdb9e7f153eb93f6686b8c37 (patch) | |
| tree | c9edf2d9df722b27f06f349fecca10ca623872bc /assets/javascripts/rectangles/map/_map.js | |
| parent | c780419e05bddf80b09e3091634361f289666f35 (diff) | |
scaling issue gotta fix
Diffstat (limited to 'assets/javascripts/rectangles/map/_map.js')
| -rw-r--r-- | assets/javascripts/rectangles/map/_map.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/assets/javascripts/rectangles/map/_map.js b/assets/javascripts/rectangles/map/_map.js index 846c73c..d8fdc79 100644 --- a/assets/javascripts/rectangles/map/_map.js +++ b/assets/javascripts/rectangles/map/_map.js @@ -8,7 +8,7 @@ var map = new function(){ base.bounds = new vec2(500,500) base.center = new vec2(0,0) - base.zoom = 1/2 + base.zoom = 1/4 var canvas = document.createElement("canvas") var ctx = window.ctx = canvas.getContext("2d") @@ -17,19 +17,7 @@ var map = new function(){ document.querySelector("#map").appendChild(canvas) base.animate = function(){ - ctx.save() - map.draw.clear_canvas() - map.draw.ruler() - - ctx.scale( base.zoom, base.zoom ) - ctx.translate( map.center.a + map.bounds.a/2, map.center.b + map.bounds.b/2 ) - ctx.scale( -1, 1 ) - - map.draw.regions(clipper.regions) - map.draw.mouse(map.ui.mouse.cursor) - scene && map.draw.camera(scene.camera) - - ctx.restore() + base.draw.animate() } } |
