Skip to content

Phaser CE v2.7.6

Compare
Choose a tag to compare
@photonstorm photonstorm released this 13 Apr 22:36
· 1746 commits to master since this release

New Features

  • 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 bulletClass argument. Without this it was difficult to set bulletClass before creating the bullet pool.

Updates

Bug Fixes

  • 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 null if Phaser has recorded no key presses yet. Reading it before a key press no longer raises an error (#132).
  • Previously, the center of 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 center during preUpdate.
  • 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 render hooks but not the preRender and postRender hooks (strange). game.renderType now contains either Phaser.CANVAS, Phaser.HEADLESS, or Phaser.WEBGL after boot.

Thanks

@alexus85, @Arcanorum, @digitsensitive, @Dreaded-Gnu, @hdodov, @IVA-apps, @JTronLabs, @Lightning3105, @mikewesthad, @nalgorry, @photonstorm, @qarlosh, @samme, @trpzn, @vpmedia