TypeScript definitions fixes and updates (thanks @monagames)
Docs typo fixes (thanks @drhayes)
The TilemapParser will now add more data when importing Image object types from Tiled. The extra data available is: image width, image height, and flags to see if the image is flipped either horizontally, vertically or diagonally (thanks @gotenxds #2564 #2554)
Group.getFurthestFrom and Group.getClosestTo has a new optional argument:
callback. This allows you to apply your own additional filtering to the distance checks, ultimately influencing the selected child (thanks @LoneStranger #2577)
Phaser.Utils.pad now calls
toStringon the input given, which means you can pass in common data types, such as numbers, and have them padded and returned as strings.
The canvas created by Phaser.Debug for use when displaying debug data is no longer stored in the CanvasPool, and is instead a stand-alone canvas, free from ever being re-used by another game object.
BitmapData has a new, optional, fifth argument:
skipPool. By default BitmapData objects will ask for the first free canvas found in the CanvasPool, but this behavior can now be customized on a per object basis.
Phaser.ArrayUtils.rotate is now deprecated. Please use Phaser.ArrayUtils.rotateLeft instead.
Phaser.Text.fontPropertiesCanvas used to be taken from the CanvasPool, but as it's constantly needed it is now generated directly from the document.
The default image texture, for when none is supplied, is now available under
The missing image texture, for when an image has failed to load, is now available under
Phaser.Cache.addImage will now check the key given, and if
__missingit will update the new consts
Phaser.Cache.MISSINGaccordingly, allowing you to replace the default or missing image textures used by Phaser.
Phaser.Cache.getPixiTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
Phaser.Cache.getPixiBaseTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
The second argument to Phaser.Cache.removeImage has been renamed from
destroyBaseTexture, as that is fundamentally what the argument always did.
AnimationManager.refreshFrame has been removed as it never actually did anything internally.
Sound.stop will check to see if
gainNodeexists before trying to disconnect from it (#2597)