Skip to content

Commit 2d2101a

Browse files
committed
Both transparent and antialias were ignored if set to false in a Game configuration object, as the parseConfig method didn't check for falsey values (thanks @amadeus phaserjs#2302)
1 parent e04504f commit 2d2101a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
315315
* BitmapText would crash if it tried to render a character that didn't exist in the font set. Any character that doesn't exist in the font set now renders a space character instead.
316316
* BitmapText would load and parse the kerning data from the font, but would never use it when rendering. The kerning values are now applied on rendering as well (thanks @veu #2165)
317317
* SinglePad.callbackContext is now set through addCallbacks method (thanks @puzzud #2161)
318+
* Both `transparent` and `antialias` were ignored if set to `false` in a Game configuration object, as the `parseConfig` method didn't check for falsey values (thanks @amadeus #2302)
318319

319320
### Pixi Updates
320321

src/core/Game.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,12 @@ Phaser.Game.prototype = {
472472
this.parent = config['parent'];
473473
}
474474

475-
if (config['transparent'])
475+
if (config['transparent'] !== undefined)
476476
{
477477
this.transparent = config['transparent'];
478478
}
479479

480-
if (config['antialias'])
480+
if (config['antialias'] !== undefined)
481481
{
482482
this.antialias = config['antialias'];
483483
}
@@ -487,7 +487,7 @@ Phaser.Game.prototype = {
487487
this.resolution = config['resolution'];
488488
}
489489

490-
if (config['preserveDrawingBuffer'])
490+
if (config['preserveDrawingBuffer'] !== undefined)
491491
{
492492
this.preserveDrawingBuffer = config['preserveDrawingBuffer'];
493493
}

0 commit comments

Comments
 (0)