mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
Removed antialias, transparent and physicsConfig arguments from the Game constructor.
This commit is contained in:
parent
e01141e522
commit
e06b900a61
1 changed files with 12 additions and 29 deletions
|
@ -66,13 +66,12 @@
|
||||||
* @param {number} [renderer=Phaser.AUTO] - Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.WEBGL_MULTI, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all).
|
* @param {number} [renderer=Phaser.AUTO] - Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.WEBGL_MULTI, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all).
|
||||||
* @param {string|HTMLElement} [parent=''] - The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself.
|
* @param {string|HTMLElement} [parent=''] - The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself.
|
||||||
* @param {object} [state=null] - The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null.
|
* @param {object} [state=null] - The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null.
|
||||||
* @param {boolean} [transparent=false] - Use a transparent canvas background or not.
|
* @param {boolean} [pixelArt=false] - Draw all image textures anti-aliased or not. The default is for smooth textures (false), but set to `true` if your game features all pixel art.
|
||||||
* @param {boolean} [antialias=true] - Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art.
|
|
||||||
* @param {object} [physicsConfig=null] - A physics configuration object to pass to the Physics world on creation.
|
|
||||||
*/
|
*/
|
||||||
Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias, physicsConfig) {
|
Phaser.Game = function (width, height, renderer, parent, state, pixelArt)
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
|
* TODO: Remove this
|
||||||
* @property {number} id - Phaser Game ID
|
* @property {number} id - Phaser Game ID
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
|
@ -86,7 +85,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||||
/**
|
/**
|
||||||
* @property {object} physicsConfig - The Phaser.Physics.World configuration object.
|
* @property {object} physicsConfig - The Phaser.Physics.World configuration object.
|
||||||
*/
|
*/
|
||||||
this.physicsConfig = physicsConfig;
|
this.physicsConfig = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {string|HTMLElement} parent - The Games DOM parent.
|
* @property {string|HTMLElement} parent - The Games DOM parent.
|
||||||
|
@ -137,12 +136,6 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||||
*/
|
*/
|
||||||
this._height = 600;
|
this._height = 600;
|
||||||
|
|
||||||
/**
|
|
||||||
* @property {boolean} transparent - Use a transparent canvas background or not.
|
|
||||||
* @default
|
|
||||||
*/
|
|
||||||
this.transparent = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {boolean} antialias - Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.
|
* @property {boolean} antialias - Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.
|
||||||
* @default
|
* @default
|
||||||
|
@ -485,14 +478,9 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof transparent !== 'undefined')
|
if (typeof pixelArt !== 'undefined')
|
||||||
{
|
{
|
||||||
this.transparent = transparent;
|
this.antialias = !pixelArt;
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof antialias !== 'undefined')
|
|
||||||
{
|
|
||||||
this.antialias = antialias;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.rnd = new Phaser.RandomDataGenerator([(Date.now() * Math.random()).toString()]);
|
this.rnd = new Phaser.RandomDataGenerator([(Date.now() * Math.random()).toString()]);
|
||||||
|
@ -514,8 +502,8 @@ Phaser.Game.prototype = {
|
||||||
* @method Phaser.Game#parseConfig
|
* @method Phaser.Game#parseConfig
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
parseConfig: function (config) {
|
parseConfig: function (config)
|
||||||
|
{
|
||||||
this.config = config;
|
this.config = config;
|
||||||
|
|
||||||
if (config['enableDebug'] === undefined)
|
if (config['enableDebug'] === undefined)
|
||||||
|
@ -543,11 +531,6 @@ Phaser.Game.prototype = {
|
||||||
this.parent = config['parent'];
|
this.parent = config['parent'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config['transparent'] !== undefined)
|
|
||||||
{
|
|
||||||
this.transparent = config['transparent'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config['antialias'] !== undefined)
|
if (config['antialias'] !== undefined)
|
||||||
{
|
{
|
||||||
this.antialias = config['antialias'];
|
this.antialias = config['antialias'];
|
||||||
|
@ -599,8 +582,8 @@ Phaser.Game.prototype = {
|
||||||
* @method Phaser.Game#boot
|
* @method Phaser.Game#boot
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
boot: function () {
|
boot: function ()
|
||||||
|
{
|
||||||
if (this.isBooted)
|
if (this.isBooted)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue