mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Config.images.white
is a new Game Config property that specifies the 4x4 white PNG texture used by Graphics rendering. You can override this via the config, but only do so if needed.
This commit is contained in:
parent
e368c479a0
commit
4795c56d79
2 changed files with 8 additions and 2 deletions
|
@ -566,6 +566,11 @@ var Config = new Class({
|
|||
*/
|
||||
this.missingImage = GetValue(config, 'images.missing', pngPrefix + 'CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==');
|
||||
|
||||
/**
|
||||
* @const {string} Phaser.Core.Config#whiteImage - A base64 encoded PNG that will be used as the default texture when a texture is assigned that is white or not loaded.
|
||||
*/
|
||||
this.whiteImage = GetValue(config, 'images.white', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC');
|
||||
|
||||
if (window)
|
||||
{
|
||||
if (window.FORCE_WEBGL)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* @typedef {object} Phaser.Types.Core.ImagesConfig
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @property {string} [default] - URL to use for the 'default' texture.
|
||||
* @property {string} [missing] - URL to use for the 'missing' texture.
|
||||
* @property {string} [default] - A base64 encoded image file to use as the 'default' texture.
|
||||
* @property {string} [missing] - A base64 encoded image file to use as the 'missing' texture.
|
||||
* @property {string} [white] - A base64 encoded image file to use as the 'white' texture.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue