This is another great update to Phaser CE with loads of new features. They skipped the 2.8.9 version because this one includes a change to the way the Emitters work that warranted a bump in version number.
As usual please see the Change Log for all the details and download the latest build from GitHub, npm or the CDNs, but here are the new features:
- Tiled polygons and rectangles are now converted into p2 physics bodies when using Phaser.Physics.P2#convertCollisionObjects (#369).
- Tileset-level collision objects created in Tiled are now added to a map's collision and objects properties using the layer's name as the key (#369).
- Phaser.ArrayUtils.numberArray can be passed a single argument to create a range starting from 0.
- Phaser.ArrayUtils.remove is a faster alternative to Array#splice.
- Phaser.Camera#fixedView is like Phaser.Camera#view but it never moves. You can use it to align objects independent of the camera's position.
- Phaser.CanvasPool.log prints canvas pool counts to the console.
- Phaser.Circle#intersectsLine
- Phaser.Circle#sample creates or positions a set of points or objects on the circle.
- Phaser.Color.interpolateColor can use either HSL or RGB color spaces.
- Phaser.Color.linear interpolates two numeric color values.
- Phaser.Color.linearInterpolation interpolates an array of numeric color values. You can assign it to TweenData#interpolationFunction to tween through such an array.
- Phaser.Ellipse#intersectsLine
- Phaser.Group#count counts children matching a key-value query.
- Phaser.Group#createMultiple now has a callback argument that lets you modify each new child.
- Phaser.Group#getFirst fetches the first child matching a key-value query.
- Phaser.Group#kill and Phaser.Group#revive toggle a Group's
alive
,exists
, andvisible
properties (#339). - Phaser.Line#intersectionWithRectangle finds the closest line-rectangle intersection (#260). You can use it for precise raycasting.
- Phaser.Physics.Arcade#closest finds the point or display object closest to another.
- Phaser.Physics.Arcade#farthest finds the point or display object farthest from another.
- Phaser.Point#clip constrains a Point to a rectangular area.
- Phaser.Point#equalsXY
- Phaser.Point#fuzzyEquals and Phaser.Point#fuzzyEqualsXY test approximate Point equality.
- Phaser.Rectangle#copyFromBounds and Phaser.Rectangle.createFromBounds are variations of copyFrom and clone that extract
left
andtop
properties instead ofx
andy
. - Phaser.Rectangle#sides creates or positions four lines representing the rectangle's sides.
- Phaser.ScaleManager#align is a shortcut for setting pageAlignHorizontally and pageAlignVertically.
- Phaser.Tween.updateColor is a helper for tweening color objects.
- Phaser.Utils.Debug#canvasPool displays canvas pool counts.
- Phaser.Utils.Debug#geom can display Ellipses.
- Phaser.Utils.Debug#phaser displays Phaser's version, rendering mode, and device audio support.
- Phaser.Utils.Debug#physicsGroup displays all the physics bodies in a Group.
- Phaser.Utils.setProperties is deep-property setter that works on any object.