diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-10 21:14:34 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-10 21:14:34 +0200 |
commit | 87366459aeb9f8695430cfead08e8c59d74eb9d7 (patch) | |
tree | 51e9535abd7f822b7411807e5d5a3d487b578d2d /web/nms.gathering.org/nms2/js/nms.js | |
parent | b204e2d146de338617dc54d4dc6f9873024c82ae (diff) |
NMS: Cleanups
- Remove prototype (merged with index/nms)
- Use fewer global variables
Diffstat (limited to 'web/nms.gathering.org/nms2/js/nms.js')
-rw-r--r-- | web/nms.gathering.org/nms2/js/nms.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/nms.gathering.org/nms2/js/nms.js b/web/nms.gathering.org/nms2/js/nms.js index 6f51b10..57e3ec6 100644 --- a/web/nms.gathering.org/nms2/js/nms.js +++ b/web/nms.gathering.org/nms2/js/nms.js @@ -14,6 +14,8 @@ var nms = { damage:false, drawText:true, now:false, + fontSize:14, + fontFace:"Arial Black", did_update:false // Set to 'true' after we've done some basic updating }; @@ -24,8 +26,6 @@ var counters = { var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); -var fontSize = 14; -var fontFace = "Arial Black"; var orig = { width:1920, height:1032 @@ -776,7 +776,7 @@ function drawSwitches() function drawScene() { if (nms.damage) { - ctx.font = Math.round(fontSize * canvas.scale) + "px " + fontFace; + ctx.font = Math.round(nms.fontSize * canvas.scale) + "px " + nms.fontFace; if (nms.now != false) { ctx.clearRect(0,0,200,20); ctx.fillStyle = "white"; |