phaser/v3/src/boot/DebugHeader.js

37 lines
955 B
JavaScript
Raw Normal View History

2016-11-22 03:11:33 +00:00
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
2016-11-22 03:32:41 +00:00
var CONST = require('../const');
2016-11-22 03:11:33 +00:00
var DebugHeader = function (config)
2016-11-22 03:11:33 +00:00
{
var c = (config.renderType === CONST.CANVAS) ? 'Canvas' : 'WebGL';
var ie = false;
2016-11-22 03:11:33 +00:00
2016-11-22 03:32:41 +00:00
if (!ie)
2016-11-22 03:11:33 +00:00
{
var args = [
'%c %c %c %c %c ' + config.gameTitle + ' / Phaser v' + CONST.VERSION + ' / ' + c + ' %c http://phaser.io',
2016-11-22 03:11:33 +00:00
'background: #ff0000',
'background: #ffff00',
'background: #00ff00',
'background: #00ffff',
'color: #ffffff; background: #000;',
'background: #fff'
];
console.log.apply(console, args);
}
else if (window['console'])
{
2016-11-22 03:32:41 +00:00
console.log('Phaser v' + CONST.VERSION + ' / http://phaser.io');
2016-11-22 03:11:33 +00:00
}
2016-11-22 03:32:41 +00:00
};
2016-11-22 03:11:33 +00:00
module.exports = DebugHeader;