<!-- init --> var init = { canvas : new Object(), ctx : new Object(), size : {x:window.innerWidth, y:window.innerHeight}, nodeStrokeFlag : false, canvasSetup : function() { console.log("passing") init.canvas = document.getElementById("canvas"); init.canvas.width = init.size.x; init.canvas.height = init.size.y; init.ctx = init.canvas.getContext("2d"); } }; init.canvasSetup(); <!-- init --> <!-- uti