window.console = window.console || { log: function () { } }; Array.prototype.forEach = Array.prototype.each = Array.prototype.forEach || function (callback) { for (var i = 0; i < this.length; i++) { callback(this[i], i, this); } }; var renderTypeDict = { 'canvas': 'canvas', 'dom': 'dom', 'webgl': 'webgl', 'forceFlash': 'flash' }; // var renderType = location.search.slice(1); // if (!renderTypeDict[renderType]) { // renderType = 'canvas'; // } var renderType = 'canvas'; var winWidth = window.innerWidth || document.documentElement.clientWidth; var winHeight = window.innerHeight || document.documentElement.clientHeight; var gameContainer = document.getElementById("game-container"); var stageWidth = window.stageWidth || winWidth; var stageHeight = 480;// window.stageHeight || (winHeight - gameContainer.offsetTop); gameContainer.style.height = stageHeight + 'px'; gameContainer.style.width = stageWidth + 'px';