The version of Phaser CE on this page is not the most current release.
Download this version of Phaser CE from npm. Need more details? Follow this tutorial
npm install [email protected]
- New method Phaser.Loader#imageFromBitmapData lets you preload an image extracted from a BitmapData canvas.
- BitmapData#generateTexture now has an optional callback argument. Most browsers now load the generated image asynchronously, so without a callback you're not guaranteed a valid texture (#136).
- Phaser.GameObjectFactory#weapon (used as
game.add.weapon) now has a
bulletClassargument. Without this it was difficult to set
bulletClassbefore creating the bullet pool.
- Phaser.Cache#addImage now emits a warning if you add an image that hasn't completed loading.
- Phaser.Frame now emits a warning if a Frame is constructed with a zero width or height.
- Phaser.Physics.Arcade#velocityFromAngle now uses Phaser.Math instead of
game.math, so you can use it without a reference to a running game (#131).
- Clarified Emitter#start documentation. It's really easier to use Emitter#explode or Emitter#flow.
- The game canvas's cursor style is now
pointerwhen the cursor is over an object with
input.useHandCursorenabled and empty at all other times. This should make it easier to set your own cursor style for the game (#110).
- TypeScript definitions fixes and updates (#75, #101, #107)
- Docs typo fixes (#101)
- Added photonstorm/phaser-plugins to the Phaser CE docs: see Phaser.Plugin (#107)
- BitmapData and RenderTexture objects are now destroyed when clearing the cache (#68). This should reduce memory use.
- Fixed an issue where a display object's preUpdate call would be skipped if a sibling was removed or destroyed, which could create small discrepancies in position, lifespan, or renderOrderID (#103).
- Fixed an issue where display objects using the default texture could have an incorrect size (1×1) and appear blank (#138). The built-in DEFAULT and MISSING textures are now loaded asynchronously to ensure that they're valid.
- Fixed an issue where game.device.canUseMultiply could hold a false negative on first (Firefox, Safari) or even subsequent (Chrome 57) page loads, disabling most blend modes when using the Canvas renderer (#130).
- Phaser.Keyboard#lastChar is now
nullif Phaser has recorded no key presses yet. Reading it before a key press no longer raises an error (#132).
- Previously, the
centerof a moving Arcade Physics Body was inaccurate during the game's update phase, and that made collision checks of circular Bodies less accurate (#122). This was fixed by updating
- Fixed an issue when dragging a sprite whose parent is scaled or rotated (#108). Now the sprite follows the cursor correctly.
- Fixed audio skipping when restarting playback (#78)
- Fixed bad rendering of multiple tinted BitmapText objects (#58)
- Fixed Object.assign not existing on older devices (#81)
- Previously, the HEADLESS renderer essentially became a CANVAS renderer after boot, which was incorrect (#74). Phaser.HEADLESS now sets up a PIXI.CanvasRenderer and a detached (invisible) canvas. It skips
renderhooks but not the
postRenderhooks (strange). game.renderType now contains either Phaser.CANVAS, Phaser.HEADLESS, or Phaser.WEBGL after boot.
@alexus85, @Arcanorum, @digitsensitive, @Dreaded-Gnu, @hdodov, @IVA-apps, @JTronLabs, @Lightning3105, @mikewesthad, @nalgorry, @photonstorm, @qarlosh, @samme, @trpzn, @vpmedia