Phaser CE 2.12.0 has been released. This release brings together a handful of new features, as well as fixes for HTML5 audio volumes and updates for the Creature runtime.
New Features / API Changes
- BitmapText has a new property letterSpacing which accepts a positive or negative number to add or reduce spacing between characters.
- Camera now has new properties centerX and centerY to get the center of the camera's current viewport.
- Updated Creature runtime. The Phaser.Creature constructor arguments have changed: the
loadAnchors
argument was removed and auseFlatData
argument was added. Phaser.GameObjectFactory#creature also added arguments (mesh
,animation
,useFlatData
) but its existing arguments weren't changed. - Phaser.Creature now has new functions
setMetaData
,enableSkinSwap
,disableSkinSwap
,setActiveItemSwap
, andremoveActiveItemSwap
adding Skin and Item Swapping support for Creature animations. - Phaser.Graphics#getVisualBounds is a new method that gets the bounds (extent) of the shapes drawn on a graphics object (#578). Unlike Phaser.Graphics#getBounds, it gives the same result whether or not a graphics object is being used as a mask.
- Phaser.SoundManager#baseLatency is a new property representing the processing latency of the underlying Web Audio context, in seconds.
Bug Fixes
- Fixed issue causing BitmapFont to fail loading if a kerning value for a character that doesn't exist in the font is defined in the xml/json (#598).
- Fix for Creature runtime modifying the JSON object you give it from the Phaser.Cache making subsequent uses of that JSON not behave in various ways, depending on how you use the runtime (when having multiple Creature objects of the same character for example).
- Phaser.PointerLock#stop will now only stop its event listeners if they were started in the first place. This avoids issues where a 3rd party lib, such as Ionic, intercepts event functions and parses them itself (thanks @photonstorm and manuelhe).
- Fixed an error when destroying a touch-locked Video (#616).
- Fixed an error when unplugging a gamepad (#610).
- Fixed streaming video in Firefox (#607).
- Fixed global volume not affecting sounds not currently playing, when using HTML audio (as in IE11) (#617).
Thanks
@Aram19, manuelhe, @micsun-al, @photonstorm, @rroylance, @samme, @Weedshaker, @wtravO