You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phaser clears/fill background with solid black (affects both CANVAS and WEBGL rendering modes), when render: {} (empty or filled) render object is present in it's config.
EDIT: samme was kind to explain, that transparent can be set in Phaser's config in 2 places, and the 'latter default' (false in render{}) in this case overrode the earlier 'true' (in config root). At this point i'd suggest that a check be made in phaser source (eg 'if proprerty is set somewhere in config object, do not override it by 'unset default value' elsewhere - i think for this resolution values of 'undefined' vs false|true could be used [in case of booleans]).
Example Test Code
Following code displays black background in phaser canvas: myPhaserConfig = { type: Phaser.AUTO, transparent: true, render: {}}
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
chrome
Description
Phaser clears/fill background with solid black (affects both CANVAS and WEBGL rendering modes), when
render: {}
(empty or filled) render object is present in it's config.EDIT: samme was kind to explain, that
transparent
can be set in Phaser's config in 2 places, and the 'latter default' (false in render{}) in this case overrode the earlier 'true' (in config root). At this point i'd suggest that a check be made in phaser source (eg 'if proprerty is set somewhere in config object, do not override it by 'unset default value' elsewhere - i think for this resolution values of 'undefined' vs false|true could be used [in case of booleans]).Example Test Code
Following code displays black background in phaser canvas:
myPhaserConfig = { type: Phaser.AUTO, transparent: true, render: {}}
Following code displays transparent background (expected):
myPhaserConfig = { type: Phaser.AUTO, transparent: true, }
As you can see, the only difference is, that we have removed the empty 'render' object.
Additional Information
Can be quickly reproduced by going to
https://labs.phaser.io/edit.html?src=src/game%20config/transparent.js&v=3.55.2
and adding a quick
render: {}
into phaser's config.The text was updated successfully, but these errors were encountered: