The latest version of Phaser CE is now available with some important changes to Mouse and MS Pointer input handling
Phaser CE 2.13.0 has been released. There are some important API changes in this version regarding Mouse and MS Pointer input:
API Changes
- When using audio tags, Sound#currentTime is now always synced to the audio source. This should prevent timing errors from playback latency (#585). After Sound#play() is called, Sound#isPlaying and Sound#onPlay are still triggered immediately (this is consistent with Sounds using Web Audio), but Sound#currentTime will not advance until playback does.
- When the mouse cursor leaves the game canvas, input out will be triggered only if Mouse#stopOnGameOut is true or MSPointer#stopOnGameOut is true (#429). They are false by default.
- MSPointer#pointerOverCallback replaces MSPointer's use of Mouse#mouseOverCallback.
- MSPointer#pointerOutCallback replaces MSPointer's use of Mouse#mouseOutCallback.
- MSPointer#stopOnGameOut replaces MSPointer's use of Mouse#stopOnGameOut.
- Removed Phaser.Mouse.WHEEL_UP. Use Phaser.MouseWheel.UP instead.
- Removed Phaser.Mouse.WHEEL_DOWN. Use Phaser.MouseWheel.DOWN instead.
- Removed Phaser.Mouse#releasePointerLock. Use Phaser.PointerLock#exit instead.
- Removed Phaser.Mouse#requestPointerLock. Use Phaser.PointerLock#request instead.
If you don't want to worry about managing both input handlers, you can disable MSPointer by passing { mspointer: false }
in your game config.
New Features
- Loader#tilemapCSV is a shortcut method for loading CSV maps.
- Loader#tilemapTiledJSON is a shortcut method for loading Tiled JSON maps.
Bug Fixes
- Animation speeds are more accurate (#606).
Thanks
@jf-m, @josalmi, @photonstorm, @samme