12345678910111213141516171819202122232425262728293031323334 |
- 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 = '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;
- gameContainer.style.height = stageHeight + 'px';
- gameContainer.style.width = stageWidth + 'px';
|