Skip to content

Releases: phaserjs/phaser-ce

Phaser CE v2.11.0

26 Jun 20:57
cc43980
Compare
Choose a tag to compare

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 are

    • input.mouse.wheelDeltainput.mouseWheel.delta
    • input.mouse.mouseWheelCallbackinput.mouseWheel.callback

    The old properties will keep working for now.

  • Pointer lock input was moved to input.pointerLock. The changed properties are

    • input.mouse.pointerLockinput.pointerLock.onChange
    • input.mouse.requestPointerLock()input.pointerLock.request()
    • input.mouse.lockedinput.pointerLock.locked
    • input.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 active property that shows whether they've been started. Their start methods return true if they've been started or false otherwise.

  • The skipFrames argument 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. Negative frameWidth and frameHeight arguments 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). Use game.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 console output easily.
  • Debug#pointer shows the pointer's movementX/movementY values and button states (for mouse pointers).
  • maxPointers can 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

04 Jun 10:33
5f6533b
Compare
Choose a tag to compare
  • 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

08 May 20:21
6750474
Compare
Choose a tag to compare

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

04 May 14:27
86f059a
Compare
Choose a tag to compare

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

22 Mar 22:07
084a32e
Compare
Choose a tag to compare

Bug Fixes

  • Fixed an error when activating a Cocoon application (#506).

Thanks

@KIVassilev, @photonstorm, @samme

Phaser CE v2.10.2

16 Mar 12:18
780a555
Compare
Choose a tag to compare

New Features

Updates

  • Phaser tries to resume a suspended WebAudio context after a user click/tap on any device (#437, #482).

Bug Fixes

TypeScript

  • PIXI.Rectangle includes more of Phaser.Rectangle's properties (#491).

Documentation

Thanks

@KIVassilev, @koalaylj, @photonstorm, @RedPanduzer, @samme, @Siri0n

Phaser CE v2.10.1

19 Feb 21:20
dc45d82
Compare
Choose a tag to compare

Version 2.10.1 - 18th February 2018

New Features

Updates

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 and height 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

19 Jan 14:11
c5a7bcf
Compare
Choose a tag to compare

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:
  • Phaser.Video#playWhenUnlocked
  • Phaser.Video#onTouchUnlock signal

Updates

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

20 Dec 21:53
f33d8f9
Compare
Choose a tag to compare

Version 2.9.4 - 20th December 2017

New Features

Updates

Bug Fixes

  • Fixed a TypeError when a Text object is created without a style argument (#415).

Thanks

@bananatron, @mblais, @mepsoid, @naglfar, @photonstorm, @samme

Phaser CE v2.9.3

11 Dec 21:25
c75ca92
Compare
Choose a tag to compare

Version 2.9.3 - 11th December 2017

New Features

Updates

Bug Fixes

Documentation

Thanks

@clesquir, @GrindheadGames, @husengbatute29, @Nek-, @photonstorm, @samme

For changes in previous releases please see the extensive Change Log.