<canvas id="game" width="568" height="320"></canvas>
var GAME = {
settings: {
canvas: document.getElementById('game'),
context: this.canvas.getContext('2d'),
gameWidth: this.context.width,
gameHeight: this.context.height
}
};
var GAME = {
settings: {
canvas: document.getElementById('game');
}
};
GAME.settings.context = GAME.settings.canvas.getContext('2d');
GAME.settings.gameWidth = GAME.settings.context.width;
GAME.settings.gameHeight = GAME.settings.context.height;
var GAME = (function(){
var s = {};
s.canvas = document.getElementById('game');
s.context = s.canvas.getContext('2d');
s.gameWidth = s.context.width;
s.gameHeight = s.context.height;
return { settings : s}
})();