Releases: phaserjs/phaser-ce
Phaser CE v2.10.6
- Fixed audio playback when restarting a paused sound (#538).
- TypeScript and documentation fixes (#537, #540, #544, #545).
Thanks
@bseiller, @GrindheadGames, @josalmi, @photonstorm, @qdrj, @samme, @Siri0n, @zhanghuanchong
Phaser CE v2.10.5
Bug Fixes
- Phaser could fail to resume a suspended Web Audio context if the mouse cursor left the browser window before clicking on the game canvas (#437).
Phaser CE v2.10.4
New Features
- Phaser.Text#testString is the character string used to calculate the text's width and height.
- Ellipse#centerX
- Ellipse#centerY
Updates
- Callbacks added with Phaser.Input#addMoveCallback receive an
event
parameter.
Bug Fixes
- Fixed a bogus warning when selecting tilemap layer 0 (#511).
- Fixed wrong position in Ellipse#random (#522).
- Fixed an Animation skipping the final frame in low-FPS situations (#524).
- Fixed wrong ellipse position in Debug#geom (#526).
- Fixed
forceType
failing to override some geometry types in Debug#geom. - Fixed unnecessary text updates when using Text#setText with
immediate=true
(#525). - Fixed issues restarting a Sound in Firefox (#530).
- Fixed an IndexSizeError in Edge/Firefox when a very small texture crop rectangle is used (#532).
TypeScript definitions
- Corrected definitions for ContactMaterial#frictionStiffness, Convex (#513).
Documentation
- Fixed typos (#517, #521).
- The Tilemap methods fill, random, replace, shuffle, and swap modify the tile index only (#484).
- The special GameConfig.transparent value 'notMultiplied' disables the WebGL context attribute
premultipliedAlpha
.
Thanks
@budda, @Hagisus, @HaoboZ, @hardylr, @intersrc, @jamesjsewell, @josalmi, @joshlory, @melissaelopez, @mickeyren, @photonstorm, @samme, @tobspr
Phaser CE v2.10.3
Phaser CE v2.10.2
New Features
- You can set clearBeforeRender when creating the game (#481).
Updates
- Phaser tries to resume a suspended WebAudio context after a user click/tap on any device (#437, #482).
Bug Fixes
- Phaser.Text objects show the correct type (#479).
- game.add.plugin forwards all arguments to game.plugins.add (#486).
- Phaser.Signal#memorized works correctly after only one listener is added (#495).
TypeScript
- PIXI.Rectangle includes more of Phaser.Rectangle's properties (#491).
Documentation
Thanks
@KIVassilev, @koalaylj, @photonstorm, @RedPanduzer, @samme, @Siri0n
Phaser CE v2.10.1
Version 2.10.1 - 18th February 2018
New Features
- Phaser.Sound#playOnce flags a sound for deletion after it is played once. This is a simple method for avoiding adding new Sound objects for sounds that are intended to just be played once and done.
- A final State#loadUpdate call is made right before the loader is reset, when Loader#progress is 100, instead of after, when Loader#progress is 0 (#468).
- Loader#onBeforeLoadComplete is a signal dispatched right before the Loader is reset (unlike Loader#onLoadComplete).
Updates
- Clarified
margin
andspacing
arguments in Phaser.Loader#spritesheet (#448). - Debug#text now uses Debug#font as its default.
Bug Fixes
- Fixed audio sprites failing to loop after pause and resume (#323).
- Fixed sounds not looping when using audio tags (#446).
- Fixed circular Arcade bodies sticking to each other during some collisions (#451).
- Fixed a sprite with input.enabled
false
triggering its onInputOut signal when the mouse leaves the game canvas (#454). - Fixed spelling error in API documentation (#458).
- Fixed some TypeScript definitions (#442, #447, #455, #460, #462, #463, #469, #475).
- The canvas now correctly scales inside a container if using relative values for
width
andheight
in the Phaser.Game constructor (#367). Make sure you give the container a height. - Fixed State#loadUpdate being called once when no assets have been loaded (#468).
- Fixed Debug#spriteInfo failing to show
sprite.name
as promised (#471).
Thanks
@bseiller, @dhashvir, @Lucas-C, @mmacvicar, @Nek-, @netdreamer, @omretterry, @pantoninho, @photonstorm, @samme, @seiyria, @squaresun, @Tembac, @wtravO
Phaser CE v2.10.0
Version 2.10.0 - 18th January 2018
New Features
- New game config arguments:
alignH
,alignV
crisp
disableStart
failIfMajorPerformanceCaveat
roundPixels
scaleH
,scaleV
,trimH
,trimV
- New game loop features:
- Phaser.Game#dropFrames skips renders when the game loop delta time is spiraling upwards (#314).
- Phaser.Game#forceSingleRender can be set to
false
to reduce the render rate to match Phaser.Time#desiredFps (#313). - Phaser.Time#ups tracks updates per second when advanced timing is enabled.
- Phaser.Time#rps tracks renders per second when advanced timing is enabled.
- Phaser.Color constants AQUA, BLACK, BLUE, GRAY, GREEN, ORANGE, RED, VIOLET, WHITE, and YELLOW. You can use these anywhere you use a numeric (hex) color value: Graphics, Sprite#tint, Stage#backgroundColor.
- Phaser.Game#pendingDestroy marks the game for destruction at the next update. It can be used safely within an update callback.
- Phaser.Point#round rounds a point's coordinates.
- Phaser.SoundManager#onTouchUnlock signal (#434)
- Phaser.SoundManager#removeAll destroys all sounds and removes them from the Manager.
- Phaser.Utils.Debug methods:
- Debug#loader displays loader progress.
- Debug#scale displays game/canvas dimensions and Scale Manager state.
- Debug#sound displays Sound Manager state.
- Phaser.Video#playWhenUnlocked
- Phaser.Video#onTouchUnlock signal
Updates
- Phaser now falls back to the Canvas renderer if AUTO is selected and WebGL context creation fails. Phaser.Device#webGL is now a soft check and doesn't create a test WebGL context. This is slightly more accurate (#402) and slightly faster (#420). Phaser.Device#webGLError was removed.
- Gamepad input is now enabled while the game is paused (#423).
- Removed gain smoothing for WebAudio volume changes (#385).
- Updated ionic example project (#381).
- Removed these deprecated items (#403):
- Phaser.ArrayUtils.rotate → Phaser.ArrayUtils.rotateLeft
- Phaser.Device.isConsoleOpen
- Phaser.Loader#useXDomainRequest → xhrLoadWithXDR.js
- Phaser.Loader#xhrLoadWithXDR → xhrLoadWithXDR.js
- Phaser.Particles#update
- Phaser.Polygon#points (as a setter) → Phaser.Polygon#setTo
- Phaser.Touch#addTouchLockCallback → Phaser.Input#addTouchLockCallback
- Phaser.Touch#removeTouchLockCallback → Phaser.Input#removeTouchLockCallback
- PIXI.BaseTexture#updateSourceImage → Phaser.Component.LoadTexture#loadTexture
- RevoluteConstraint#motorIsEnabled → RevoluteConstraint#motorEnabled
- Shape.RECTANGLE → Shape.BOX
Bug Fixes
- Fixed a false positive in TweenManager#isTweening (#414).
- Changing a display object's smoothed property now marks the WebGL texture as dirty (#432, #433).
- Fixed Phaser.Sound temporarily having an incorrect gain setting at creation time.
- Fixed sprites not receiving onInputOut when the pointer leaves the game canvas (#429).
- Fixed some TypeScript definitions.
Thanks
@ankush-badyal, @Dreaded-Gnu, @Mertank, @pavle-goloskokovic, @photonstorm, @qdrj, @samme, @squaresun
Phaser CE v2.9.4
Version 2.9.4 - 20th December 2017
New Features
- TweenManager#isTweening has a
checkIsRunning
argument (#414). - You can now pass
game.stage
as theparent
parameter in thegame.add
methods. - Arcade#closest, Arcade#distanceBetween, and Arcade#farthest have a
useCenter
argument (#418).
Updates
- Phaser.Device tests for WebGL stencil buffer support (#402).
Bug Fixes
Thanks
@bananatron, @mblais, @mepsoid, @naglfar, @photonstorm, @samme
Phaser CE v2.9.3
Version 2.9.3 - 11th December 2017
New Features
- Phaser.BitmapData#polygon draws a polygon.
- Phaser.Keyboard#removeCallbacks removes callbacks added by Phaser.Keyboard#addCallbacks.
- Phaser.Line#fromPoints
- Phaser.Loader#imageFromGrid and Phaser.Loader#imageFromTexture are image-loading counterparts of Phaser.Create#grid and Phaser.Create#texture.
- Phaser.Point.sortClockwise sorts points around a reference point.
- Phaser.Point#angleXY
- Phaser.Point#atan computes a point's arctangent.
- Phaser.Point#expand increases a point's magnitude to a minimum length.
- Phaser.World#wrapAll wraps all members of a group.
Updates
- Audio and video are now touch-unlocked only via the touchend event (#92). Previously we used
touchend
for audio on newer Chrome and iOS clients andtouchstart
in all other cases. - Tilemap#addTilesetImage, Tilemap#createFromObjects, and Tilemap#createLayer print the map's contents (following the usual warning) in the console if you pass a bad name or identifier, to help you correct it.
- Tileset#addTilesetImage gives a little more information when warning about image dimension mismatches.
- Optimized Phaser.Utils.getProperty.
- Removed Phaser.TweenData#yoyoCounter, an extraneous property that Phaser never used.
- p2 TypeScript definitions fixes and updates (#406).
Bug Fixes
- Phaser.Tween#start no longer tries to start a tween marked for deletion (such as by Tween#stop). Instead it prints a warning to the console (#401).
- Fixed drag movement of fixedToCamera sprites when the camera is scaled (#405).
- Fixed tweens not repeating when Tween#start is called after Tween#repeat (#408).
- StateManager#loadComplete is no longer called by the Loader if the state has been destroyed (#410).
- Added TypeScript definitions for Phaser.Sprite#outOfCameraBoundsKill.
Documentation
canvas
,canvasId
,canvasStyle
, and forceSetTimeOut can be set in the game configuration object.
Thanks
@clesquir, @GrindheadGames, @husengbatute29, @Nek-, @photonstorm, @samme
For changes in previous releases please see the extensive Change Log.
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