Skip to content

Commit e06b900

Browse files
committed
Removed antialias, transparent and physicsConfig arguments from the Game constructor.
1 parent e01141e commit e06b900

1 file changed

Lines changed: 12 additions & 29 deletions

File tree

src/core/Game.js

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,12 @@
6666
* @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).
6767
* @param {string|HTMLElement} [parent=''] - The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself.
6868
* @param {object} [state=null] - The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null.
69-
* @param {boolean} [transparent=false] - Use a transparent canvas background or not.
70-
* @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.
71-
* @param {object} [physicsConfig=null] - A physics configuration object to pass to the Physics world on creation.
69+
* @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.
7270
*/
73-
Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias, physicsConfig) {
74-
71+
Phaser.Game = function (width, height, renderer, parent, state, pixelArt)
72+
{
7573
/**
74+
* TODO: Remove this
7675
* @property {number} id - Phaser Game ID
7776
* @readonly
7877
*/
@@ -86,7 +85,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
8685
/**
8786
* @property {object} physicsConfig - The Phaser.Physics.World configuration object.
8887
*/
89-
this.physicsConfig = physicsConfig;
88+
this.physicsConfig = null;
9089

9190
/**
9291
* @property {string|HTMLElement} parent - The Games DOM parent.
@@ -137,12 +136,6 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
137136
*/
138137
this._height = 600;
139138

140-
/**
141-
* @property {boolean} transparent - Use a transparent canvas background or not.
142-
* @default
143-
*/
144-
this.transparent = false;
145-
146139
/**
147140
* @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.
148141
* @default
@@ -155,7 +148,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
155148
* Configuration object with the property `multiTexture` set to true. It has to be enabled before
156149
* Pixi boots, and cannot be changed after the game is running. Once enabled, take advantage of it
157150
* via the `game.renderer.setTexturePriority` method.
158-
*
151+
*
159152
* @property {boolean} multiTexture
160153
* @default
161154
* @readOnly
@@ -485,14 +478,9 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
485478
this.parent = parent;
486479
}
487480

488-
if (typeof transparent !== 'undefined')
489-
{
490-
this.transparent = transparent;
491-
}
492-
493-
if (typeof antialias !== 'undefined')
481+
if (typeof pixelArt !== 'undefined')
494482
{
495-
this.antialias = antialias;
483+
this.antialias = !pixelArt;
496484
}
497485

498486
this.rnd = new Phaser.RandomDataGenerator([(Date.now() * Math.random()).toString()]);
@@ -514,8 +502,8 @@ Phaser.Game.prototype = {
514502
* @method Phaser.Game#parseConfig
515503
* @protected
516504
*/
517-
parseConfig: function (config) {
518-
505+
parseConfig: function (config)
506+
{
519507
this.config = config;
520508

521509
if (config['enableDebug'] === undefined)
@@ -543,11 +531,6 @@ Phaser.Game.prototype = {
543531
this.parent = config['parent'];
544532
}
545533

546-
if (config['transparent'] !== undefined)
547-
{
548-
this.transparent = config['transparent'];
549-
}
550-
551534
if (config['antialias'] !== undefined)
552535
{
553536
this.antialias = config['antialias'];
@@ -599,8 +582,8 @@ Phaser.Game.prototype = {
599582
* @method Phaser.Game#boot
600583
* @protected
601584
*/
602-
boot: function () {
603-
585+
boot: function ()
586+
{
604587
if (this.isBooted)
605588
{
606589
return;

0 commit comments

Comments
 (0)