summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine/map/draw.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-30 12:24:39 -0400
committerJules Laplace <jules@okfoc.us>2015-04-30 12:24:39 -0400
commitdea857bcfb9695a1e205b7cf224388660c2735af (patch)
tree783a36ad12e04af330f3cdfb237eed69a4928704 /public/assets/javascripts/rectangles/engine/map/draw.js
parent94ba321f96638906e41eda7abf371066011c8508 (diff)
minimap can pivot with camera orientation
Diffstat (limited to 'public/assets/javascripts/rectangles/engine/map/draw.js')
-rw-r--r--public/assets/javascripts/rectangles/engine/map/draw.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/engine/map/draw.js b/public/assets/javascripts/rectangles/engine/map/draw.js
index 24f7cf3..11ba3f8 100644
--- a/public/assets/javascripts/rectangles/engine/map/draw.js
+++ b/public/assets/javascripts/rectangles/engine/map/draw.js
@@ -17,6 +17,7 @@ Map.Draw = function(map, opt){
else if (opt.minimap) {
ctx.translate( map.dimensions.a * 1/2, map.dimensions.b * 1/2)
ctx.scale( map.zoom, map.zoom )
+ if (map.opt.pivot) { ctx.rotate(scene.camera.rotationY + PI) }
ctx.translate( opt.center.x, - opt.center.z )
ctx.scale( -1, 1 )