Releases: phaserjs/phaser-ce
Phaser CE v2.11.1
Version 2.11.1 - 2 October 2018
Bug Fixes
- Fixed an error passing
box2doptions in the game configuration settings (#553). - Fixed some compressed texture formats failing to load (#562).
- Fixed an issue where if the WebGL renderer failed to initialize that RenderTexture's would still try to use it if no renderer was provided (#575).
- Fixed an inconsistent return value in BitmapData#copy (#580).
- Tweens are now cleaned up completely when destroying the game (#581).
- Game now nulls a reference to itself from PIXI after destroy (#583).
- Fixed a BitmapFont frame error when using trim frame in atlas (#587).
- Fixed BitmapData#shadow ignoring blur or x/y offset when set to 0 (#591).
Updates
- AnimationParser.spriteSheet now tells you the minimum image dimensions it expects if it fails to produce at least one complete frame from the spritesheet (#559).
- Game now checks SoundManager's
muteOnPauseproperty whenever the game'spausedproperty is set so one can control whether sounds play when the game is manually paused. Previously, the property was only used when the game focus was lost in the DOM (#572).
TypeScript definitions
- Fixed the definition for bitmapText() in GameObjectFactory (#561).
- Fixed the definition for clear() in RenderTexture (#573).
- Fixed the definition for Video volume.
Documentation
- Changed the game configuration object's
canvasIDproperty name. The previous name,canvasId, was incorrect and would be ignored. - Clarified the
spacingargument in Loader#spritesheet (#448, #559). - Corrected P2#createGearConstraint (#566).
- Corrected Tilemap#copy, Tilemap#replace (#586).
- Typo (#594).
- Corrected Key#upDuration, Keyboard#upDuration (#595).
Thanks
@B10215029, @CorayThan, @FostUK, @Jazcash, @Lucas-C, @Mertank, @Nek-, @aeonwilliams, @dywedir, @foreverip, @giniwren, @josalmi, @joshlory, @rydash, @samme, @tiagokeller, @zhaxiu3
Phaser CE v2.11.0
Version 2.11.0 - 26 June 2018
If you're starting or stopping input handlers manually, you'll have to make some simple changes to your code.
API Changes / New Features
-
Phaser now starts the Pointer Events handler (with capture off) or the Mouse handler (with capture off), but not both. This makes input behavior more consistent and avoids some rare conflicts between the two when running simultaneously.
If you want to disable the Pointer Events handler, pass
{ mspointer: false }in your game config. The Mouse handler will be used instead.If you want to run both handlers together, you can start the Mouse handler manually. You should also turn on capture for the Pointer Events handler to avoid duplicate events:
game.input.mouse.start(); game.input.mspointer.capture = true;
-
Mouse wheel input was moved to
input.mouseWheel. The changed properties areinput.mouse.wheelDelta→input.mouseWheel.deltainput.mouse.mouseWheelCallback→input.mouseWheel.callback
The old properties will keep working for now.
-
Pointer lock input was moved to
input.pointerLock. The changed properties areinput.mouse.pointerLock→input.pointerLock.onChangeinput.mouse.requestPointerLock()→input.pointerLock.request()input.mouse.locked→input.pointerLock.lockedinput.mouse.releasePointerLock()→input.pointerLock.exit()
The old properties will keep working for now.
There is a new Signal,
input.pointerLock.onError, dispatched when a request fails.Beware that Chrome < 68 doesn't pass movement values when using Pointer Events with pointer lock, so you should use the Mouse handler instead for that.
-
game.debug.inputInfo()now shows which input handlers and pointers are active. -
All the input handlers have an
activeproperty that shows whether they've been started. Theirstartmethods return true if they've been started or false otherwise. -
The
skipFramesargument in AnimationParser#spriteSheet now works as an offset (#514). When positive, it's an offset from the start of the parsed frame list; when negative, it's an offset from the end. NegativeframeWidthandframeHeightarguments are no longer allowed. -
preRender() and postRender() hooks are no longer called for the HEADLESS renderer.
-
game.make.group()no longer assigns a default parent. This is more consistent with the rest of the game.make methods (#525). Usegame.add.group()instead to add the Group to the game world. -
Point.parse() no longer converts coordinates to integers (#502). Use the new method Point.trunc() as well if you want the previous behavior.
-
The default Debug#font is now '14px monospace'.
-
The unused and deprecated property MSPointer#button was removed.
New Features
- States have a new postUpdate method hook. It's called after game objects have received all their own updates (including physics), but before the Stage has calculated the final transformations.
- Debug#spriteInfo shows the sprite's parent, if any.
- When a sprite is being dragged you can read its change in position (as
deltaX,deltaY) in the onDragUpdate handler. - Phaser.Math.trunc() truncates a number.
- Phaser.EmptyRectangle replaces PIXI.EmptyRectangle.
- Debug#device shows device graphics, audio, and input support. It may be helpful on devices where you can't see
consoleoutput easily. - Debug#pointer shows the pointer's movementX/movementY values and button states (for mouse pointers).
maxPointerscan be passed in the game config, setting Input#maxPointers.
Updates
- Removed the unnecessary 'Audio source already exists' warning.
Bug Fixes
- Masks are no longer disabled by getBounds() and are excluded from bounds calculations (#334).
- Sprites' bringToTop() and sendToBack() methods now work as expected for all parent types, not just Groups (#549).
Thanks
@giniwren, @griever989, @mindcity, @omretterry, @photonstorm, @samme, @Siri0n, @tobspr
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
eventparameter.
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
forceTypefailing 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
marginandspacingarguments 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
falsetriggering 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
widthandheightin 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.nameas 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,alignVcrispdisableStartfailIfMajorPerformanceCaveatroundPixelsscaleH,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
falseto 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
checkIsRunningargument (#414). - You can now pass
game.stageas theparentparameter in thegame.addmethods. - Arcade#closest, Arcade#distanceBetween, and Arcade#farthest have a
useCenterargument (#418).
Updates
- Phaser.Device tests for WebGL stencil buffer support (#402).
Bug Fixes
Thanks
@bananatron, @mblais, @mepsoid, @naglfar, @photonstorm, @samme