/* */ window.ctx = window.w = window.h = null; var map = new function(){ var base = this base.bounds = new vec2(500,500) base.center = new vec2(0,0) base.zoom = 1/4 var canvas = document.createElement("canvas") var ctx = window.ctx = canvas.getContext("2d") var w = window.w = canvas.width = 500 var h = window.h = canvas.height = 500 document.querySelector("#map").appendChild(canvas) base.update = function(){ base.draw.animate() } }