Releases: phaserjs/phaser-ce
Phaser CE v2.9.2
Version 2.9.2 - 9th November 2017
New Features
- Added
adjustSize
parameter to Phaser.Tilemap#createFromObjects. Setting this to false will disable copying the object'swidth
andheight
to the new sprite.
Updates
- When using Web Audio (gain), volume and mute changes are smoothed (#385).
Bug Fixes
- Fixed a bug that did not show the last line of text of a BitmapText when the last character was the one that created the need for a new line (when maxWidth was set).
- Fixed grammar in the error message if an invalid State object is provided to the StateManager.
- Fixed Button#forceOut and Button#justReleasedPreventsOver failing on touch devices. The correct Phaser.PointerMode#CONTACT is now used instead of the undefined Phaser.PointerMode.TOUCH (#392).
- Fixed dead, physics-enabled game objects not being destroyed by pendingDestroy (#399).
Thanks
@16patsle, @andiCR, @daniel-nth, @JamesSkemp, @martinlindhe, @photonstorm, @rmartone, @samme
Phaser CE v2.9.1
Version 2.9.1 - 10th October 2017
Bug Fixes
- Phaser.Tilemap#setTileIndexCallback now correctly removes a callback when
null
is passed. - Fixed Emitter#counts not counting.
- Fixed missing TypeScript return values (#382).
Thanks
@masondesu, @pavle-goloskokovic, @photonstorm, @samme
Phaser CE v2.9.0
Version 2.9.0 - 8th October 2017
The minor version increase is for changes to Emitter#cursor.
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.
Updates
- Particle emitter release has been made more efficient (#333).
- You can access the most recently emitted particle in Emitter#cursor. After the emitter has started, you should treat Emitter#cursor as read-only, because Phaser will modify it while it emits particles.
Bug Fixes
- Fixed some TypeScript definitions (#374).
- Phaser.Tilemap#createFromObjects no longer overrides the
visibility
property value as set in Tiled. - Fixed and optimized Phaser.Utils.setProperty.
Documentation
- Added missing arguments in Phaser.State methods.
- Phaser.Game#clearBeforeRender must be true for Phaser.Stage#backgroundColor to appear (#377).
- Phaser.Stage#backgroundColor and Phaser.Stage#disableVisibilityChange can be set directly in a Phaser.Game configuration object.
Thanks
@cursorial, @HeinousTugboat, @masondesu, @photonstorm, @samme, @samid737
Phaser CE v2.8.8
Version 2.8.8 - 25th September 2017
New Features
Updates
- Renamed Emitter#count to Emitter#counts. Emitter#count is deprecated and will be removed in v2.9.0.
- Removed deprecated Phaser.Events#onRemovedFromWorld.
Bug Fixes
- Fixed p2 polygon collisions (#366).
- Fixed a nonfatal error when clicking the game canvas in browsers not supporting Document.hasFocus() (e.g., Opera Mini, older Opera) (#367). In these browsers the game may not automatically resume when refocused in an iframe; use one of the workarounds in #236.
- Phaser.Color.updateColor now rounds fractional RGB values to integers when updating the
rgba
property (#361). - Added
roundPixels
to WebGLRenderer#renderSession (#362). - Fixed some TypeScript definitions (#354, #368).
Documentation
- Updated TypeScript guide (#292). Edits are welcome.
- Added Phaser.Button
callback
arguments (same as Phaser.Events#onInputUp) (#353). - Added Phaser.Input callback arguments (#368).
- Added Phaser.Plugin: Callbacks.
- Corrected Phaser.Tileset#containsTileIndex (#358).
- Corrected Phaser.State: Callbacks.
Thanks
@bobhfut, @falquaddoomi, @HaoboZ, @pavle-goloskokovic, @photonstorm, @samme
Phaser CE v2.8.7
Version 2.8.7 - 12th September 2017
Bug Fixes
- Fixed TypeScript error (#351).
- onChildInputDown, onChildInputUp, onChildInputOver, and onChildInputOut signals now fire correctly for particle emitters (#349).
Thanks
Phaser CE v2.8.6
Version 2.8.6 - 10th September 2017
Updates
- Several internal changes in Phaser.DeviceButton and Phaser.Pointer (#340).
Bug Fixes
- Fixed an issue where the DEFAULT and MISSING textures could be missing from the game cache when the game starts (#280 via #138).
- Fixed several issues related to Phaser.MSPointer and pointer events (#293, #250)
- Fixed an error when using TweenData#generateData with an array-based tween (#346).
- Fixed game in an iframe not auto-resuming when refocused (#236).
- Fixed some TypeScript definitions (#342, #344).
Documentation
- Fixed navigation menu obscuring anchor link targets at the top of the window (#343).
- Updated Phaser.MSPointer
- Added example for Tween#tween.onUpdateCallback.
- Updated TweenData#value.
Thanks
@2called-chaos, @bseiller, @falquaddoomi, @johnbuttcoingalt, @photonstorm, @samme, @samvieten, @yupaul
Phaser CE v2.8.5
Version 2.8.5 - 30th August 2017
Updates
-
Since v2.8.4 custom build commands need a slightly different argument syntax (#321, #324), e.g.,
grunt custom --exclude=moduleName --filename=phaser-custom
-
Updated Ionic project template (#328).
-
API Docs have a new look.
Bug Fixes
- Fixed sprite texture being destroyed in PIXI.Sprite#setTexture contrary to
destroyBase=false
. - Fixed a ReferenceError in Phaser.Input#executeTouchLockCallbacks affecting Firefox Mobile (#336).
Documentation
- Arcade.Body#friction: a moving, immovable Body applies its own
friction
to a non-immovable riding Body - DisplayObject
- Emitter#area: only the
width
andheight
are used. - Emitter#flow
- Emitter#start (#330)
- PhaserGlobal: added.
Thanks
@Dreaded-Gnu, @goldfire, @photonstorm, @rafelsanso, @ryanrossiter, @samme, @Zykino
Phaser CE v2.8.4
Version 2.8.4 - 15th August 2017
Updates
- Arcade#collide and Arcade#overlap skip empty array members in calls like
collide(group, [undefined])
, so you don't unintentionally collide a group against itself. - Added an
epsilon
argument for fuzzy comparisons in Phaser.Line#pointOnLine and Phaser.Line#pointOnSegment (#312). - Removed obsolete PIXI TypeScript definitions.
- Removed filters/pixi. They require PIXI.AbstractFilter, which was removed in 2.7.0.
- Updated NPM dependencies (except typescript; phaserjs/phaser#2198) and added package-lock.json.
- Deprecated Phaser.Device.isConsoleOpen. Now it always returns false.
- Phaser.Input now handles touch unlocking via Phaser.Touch or Phaser.MSPointer. Phaser.Touch#addTouchLockCallback and Phaser.Touch#removeTouchLockCallback are still available but deprecated; you should use Phaser.Input#addTouchLockCallback and Phaser.Input.#removeTouchLockCallback instead (#37).
Bug Fixes
- Improved animation synchronization during irregular frame rates (#310).
- Fixed bad
game
reference in Phaser.Creature. - Fixed wrong dimensions of Debug#canvas and Debug#sprite when a WEBGL game is scaled (#298).
- TileSprite#tint now works when rendering with CANVAS.
- Fixed sprites not receiving a preUpdate when they have a
fresh
ancestor with a physics body, which would leave themfresh
and with incorrectworld
andbody.position
values for several frames (#299). - Fixed movement of sprites with fixedToCamera when dragged by pointer (#297).
- Fixed Creature relative anchor points to be absolute (#288).
- Fixed P2 Physics body not rotating shape (#258).
- Audio is now also unlocked for Android Chrome ≥ 55, fixing audio not playing in cross-origin iframes (#37).
- Fixed some TypeScript definitions (#317, #319).
Documentation
- Arcade Physics bodies don't scale with camera scale (#315).
- cacheAsBitmap and generateTexture can trim transparent pixels (#283).
- Phaser.Physics.P2.Body#addPolygon can mutate the
points
argument (#301). - InputHandler#enableDrag
alphaThreshold
argument is a number, not boolean. - Phaser.ScaleManager#startFullScreen
- Health#damage, Health#heal, and Health#setHealth were missing (#308).
Thanks
@Aerolivier, @AleBles, @andrewjb123, @davvidbaker, @Formic, @fyyyyy, @Majirefy, @photonstorm, @Plukers, @samid737, @samme, @sarbasamuel, @tommitytom
Phaser CE v2.8.3
Version 2.8.3 - 21st July 2017
Updates
- Added Ionic project template and a small guide to README (#96).
Bug Fixes
PIXI Updates
- Replaced all references to PIXI.Matrix and PIXI.identityMatrix with Phaser.Matrix and Phaser.identityMatrix.
Thanks
@Arche-san, @cloakedninjas, @dolanmiu, @Dreaded-Gnu, @photonstorm, @samme
Phaser CE v2.8.2
Version 2.8.2 - 14th July 2017
New Features
-
Phaser.Point.set is a static counterpart to Phaser.Point#set. It can be used on any point-like object, e.g.,
Phaser.Point.set(PIXI.Sprite.defaultAnchor, 0.5); //-> {x: 0.5, y: 0.5}
Updates
- Added TypeScript
types
to package.json (#276). - New webpack project template (#95).
- Phaser.Component.Core.init checks types of the
game
,x
, andy
arguments, since these mistakes can be hard to track down (outside of TypeScript). The cost is likely trivial, but you can skip these by setting Phaser.Component.Core.skipTypeChecks to true. - Phaser.Utils.Debug#renderer lists currentBatchedTextures (added by PIXI.WebGLRenderer#setTexturePriority).
- Phaser.TilemapParser.parseTiledJSON warns if a tilemap contains an external tileset, which Phaser doesn't read (#273).
- Phaser.Tilemap#createFromObjects assigns the width and height of Object Tiles to the newly created Sprite (previously these were ignored).
Bug Fixes
- Added missing PIXI.DisplayObject#constructor (#278).
- Arcade.Body#render, Debug#geom (circles, ellipses), Debug#rectangle, and Debug#spriteBounds use Debug#lineWidth.
- Fixed PIXI.CanvasRenderer#renderSession.roundPixels misspelled as
roundPx
in Debug#renderer. (roundPx is a Camera property.) - Fixed some TypeScript definitions (#174, #270, #274, #277).
- The debug canvas is returned to the canvas pool when the game is destroyed (#269).
Thanks
@bulgakovk, @cmd-johnson, @dolanmiu, @georgesboris, @johnbuttcoingalt, @mindcity, @photonstorm, @samme