-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Game config: Transparent is ignored when bacgroundColor set #5362
Copy link
Copy link
Closed
Description
Version
- Phaser Version: 3.23
- Operating system: Windows 10
- Browser: All Browsers
Description
If game config contains "transparent = true" and "backgroundColor = color", transparent is ignored and color applied to game canvas.
From official documentation:
" Phaser.Core.Config#backgroundColor - The background color of the game canvas. The default is black. This value is ignored if transparent is set to true."
Example Test Code
var config = {
type: Phaser.AUTO,
backgroundColor: '#65f865',
transparent: true,
scale: {
// we do scale the game manually in resize()
mode: Phaser.Scale.NONE,
width: 600,
height: 800,
//autoCenter: Phaser.Scale.CENTER_BOTH,
},
physics: {
default: 'arcade',
arcade: {
debug: true,
gravity: { y: 600 }
}
}
};
Additional Information
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels