Releases: phaserjs/phaser-ce
Phaser CE v2.8.1
Version 2.8.1 - 20th June 2017
New Features
- Debug#camera shows the camera follow target and deadzone.
- Debug#renderer prints some useful properties of the game renderer. In WebGL mode, this includes draw counts, texture space limit, and texture batch size.
- Point#setToPolar places a Point from polar coordinates (angle and distance). You can use it to set velocity or acceleration (as
velocity.setToPolar(angle, speed)
), as many of the Arcade Physics helpers now do. - Arcade.Body#blocked.none describes whether a Body is blocked on any edge.
blocked
and touching now have identical keys. - Arcade.Body#stop halts all motion.
- Emitter#count records some diagnostic quantities:
count.emitted
,count.failed
,count.totalEmitted
,count.totalFailed
. - Group#shuffle orders children randomly.
- PIXI.Sprite.defaultAnchor holds the initial anchor values for new Sprites (default: [x=0, y=0]).
- Phaser.Math.HALF_PI is π / 2.
Updates
- Added PIXI.canUseNewCanvasBlendModes to support Particle Storm Plugin (phaserjs/phaser#2909). It's equivalent to Phaser.Device.canUseMultiply.
- Debug#cameraInfo now displays the follow target (
target
),roundPx
,atLimit
, anddeadzone
. - Debug#isDisabled is now defined in two additional cases:
true
when a new game is created withenableDebug: false
; andfalse
otherwise. As before, it istrue
when Phaser is built without the Debug class. - ScaleManager#forceOrientation warns if you try to force both orientations.
- WebGLRenderer#setTexturePriority warns if
maxTextureAvailableSpace
is exhausted. - Documented an undocumented feature of Phaser.Signal: returning
false
from a callback stops Signal propagation, just as Signal#halt does (#243).
Bug Fixes
- Fixed WebGLRenderer#setTexturePriority not clearing the current batch.
- Fixed incorrect
worldRotation
for some objects (#259). - Fixed
NaN
value for some objects'worldRotation
andworldScale
properties.worldTransform
was still correct. - Fixed Phaser.Input#hitTest when texture resolution ≠ 1.
- Fixed an incorrect area in Phaser.Input#hitTest when a Creature is reversed on either axis.
- Fixed camera shake failing to be reset to 0 when camera is reset.
- Added some missing TypeScript return values (#255).
- Fixed typo for TypeScript definition of
IGameConfig.multiTexture
property.
Thanks
@andrewjb123, @dhashvir, @Formic, @jbpuryear, @noidexe, @pavle-goloskokovic, @photonstorm, @rgk, @samme, stupot
Phaser CE v2.8.0
We've bumped the minor version (2.8) for changes in how circular Arcade Physics bodies behave with scaled sprites. We consider this a bug fix (#235), but since the prior behavior wasn't documented and existing code might be relying on it, we wanted to give you a heads-up.
New Features
- You can emit particles in a radial pattern with Emitter#setAngle.
- Emitter#output, Emitter#lifespanOutput, and Emitter#remainder describe particle flow rate.
- You can toggle drag (resistance) on or off with Arcade.Body#allowDrag. You might apply drag only when a character is touching the ground, for example.
- Group#checkAny tests if at least one child matches a given property value.
- Group#killAll kills all existing children. (Also useful for shutting off particle emitters.)
- Group#reviveAll revives all non-existing children.
- Group#resetAll calls resetChild on all children (changing position, texture, and frame, if specified).
- Group#scatter places each child at a random position within a Rectangle or the World bounds.
- Point.isPoint identifies objects that can be safely used in Point operations.
Updates
- Arcade.Body#radius represents a length relative to the sprite's texture dimensions. The effective radius of the body scales automatically when the sprite scale changes, as with rectangular bodies, and the body is sized correctly when the sprite's scale is different from (1, 1) (#235).
- Create#grid and Create#texture accept callbacks (#241, #136) and can return a BitmapData object when passed
generateTexture=false
.
Bug Fixes
- Fixed incorrect Phaser.Text dimensions when assigning a numeric string to strokeThickness (#239). (You should still use a number instead, though.)
- Fixed Sounds ignoring changes to global volume when using audio tags.
- Fixed looping timers not getting removed completely when destroyed.
Thanks
@ColaColin, @GameDevFox, @goldfire, @netgfx, @photonstorm, @rblopes, @samme, @shunsei, @Xesenix
Phaser CE v2.7.10
New Features
- Added Creature alpha (
creature.alpha = 0.5
for 50% opacity) - Added Creature tinting (
creature.tint = 0xFF0000
for red tint) - You can now set Phaser.Utils.Debug#lineWidth, the width of the stroke of shapes drawn by Debug#body and Debug#geom.
Updates
- Group#checkProperty now returns false if the
child
argument is not a child of the Group. Use Phaser.Utils.getProperty instead to read a property value on any object. - Removed
/docs
and/resources
from Phaser CE's Bower and NPM packages, which are now much smaller. - Removed some duplicate files from
/build
.
Bug Fixes
- Fixed a TypeError in pointer-over checks when Phaser.Creature is missing
- Fixed Group#checkAll and Group#checkProperty returning a false negative when
force
was used (#219). - Utils.getProperty now returns undefined for missing properties. It had claimed to return null, but could return either null or undefined depending on chain length (#218).
- Fixed Group#checkAll, Group#checkProperty, and Utils.getProperty failing to retrieve nested properties (#220).
- Corrected Group#checkAll and Group#checkProperty argument types (#216).
- Group#getAll now correctly returns all children when the
property
andvalue
arguments are omitted. - Fixed Emitter#emitParticle failing to apply certain particle scale values.
Thanks
@andrewjb123, @EmilSV, @entozoon, @greut, @jbpuryear, @mikkoh85, @MrBaummann, @photonstorm, @rblopes, @rmkubik, @samme
Phaser CE v2.7.9
Phaser CE v2.7.8
Version 2.7.8 - 8th May 2017
New Features
- You can now set Group#updateOnlyExistingChildren to skip update calls on children with
exists = false
(#187). - Phaser.ScaleManager#setUserScale now has
queueUpdate
andforce
parameters. Set these to false if your resize callback is being called repeatedly (#197). - Added Phaser.Creature#createAllAnimations to force load all animations in a creature mesh. It must be called before Phaser.Creature#setAnimation.
- Added Phaser.Creature#setAnimationPlaySpeed.
- Added Phaser.Creature.html#height and Phaser.Creature#width. You can set these dimensions directly rather than by using
scale
. - Added Phaser.Creature#setAnchorPointEnabled, Phaser.Creature#anchorX, and Phaser.Creature#anchorY for setting a Creature's anchor point dynamically (still experimental).
Updates
- Removed the upper limit of 12 for Phaser.Loader#maxParallelDownloads. The default value is still 4. Most browsers limit parallel connections to 6 per domain. Older IE and Android browsers may suffer with a value above 4 (#170).
- Arcade Physics Bodies no longer receive angular motion updates while they have allowRotation disabled, as this was unnecessary.
- Phaser.Text#align can now be set in any case or mix of cases (e.g., 'left', 'Left', 'LEFT').
- Phaser CE API now shows a synopsis like the Phaser 2.6 docs. You can still find the complete README on GitHub.
- Updated ScaleManager docs.
- Clarified
gid
argument in Phaser.Tilemap#createFromObjects. It can represent an object'sgid
,id
, orname
. - Clarified Phaser.Image's use of the Animation component (#185). Images can be animated the same way Sprites can.
Bug Fixes
- Fixed an issue where Sprites sharing the same texture were distorted or hidden when a WebGLFilter was applied (#39, #153, #154).
- Fixed a 'memory exhausted' error in PIXI.PixiFastShader when compiling shaders with multiTexture enabled.
- Fixed a TypeError in PIXI.WebGLGraphics when trying to render a Graphics object with a missing WebGL context (#178)
- Fixed a ReferenceError in PIXI.WebGLRenderer when running Phaser in ES5 strict mode.
- Fixed some Typescript definitions (#167).
- Phaser now correctly sets a Creature's anchor point (as set in Creature editor) when a creature mesh is loaded.
- Fixed CreatureManager#CreateAllAnimations crashing in Chrome.
Thanks
@aaronransley, @andrewjb123, @Cryt1c, @goldfire, @gre, @LandonSchropp, @NickH-nz, @noseglid, @photonstorm, @samme, @tanquetav, @vantreeseba, @vpmedia, @Xan0C
Phaser CE v2.7.7
Version 2.7.7 - 20th April 2017
Bug Fixes
- Fixed failure to load compressed textures when using URLs with query strings (#166)
- Fixed some TypeScript definitions (#168)
- Fixed missing default values for
resolution
in Phaser.LoaderParser BitmapFont methods (#168). - Fixed particle autoAlpha and autoScale tweens running at double speed (#160).
- Fixed loading of compressed textures (#17, #162)
- Removed
any
key in Phaser.Physics.Arcade.Body#checkCollision. It was never used, so setting it had no effect (#161). Use!checkCollision.none
instead. - Fixed Phaser.Sound exception when using IE with AudioTag and high volume values (#157). Now volume is clamped between 0 and 1 in every browser when using AudioTags.
- Fixed incorrect worldScale calculation (#15)
Thanks
@fridrisnew, @goldfire, @hdodov, @Peter42, @photonstorm, @samme, @SBCGames, @vpmedia
For changes in previous releases please see the extensive Version History.
Phaser CE v2.7.6
New Features
- New method Phaser.Loader#imageFromBitmapData lets you preload an image extracted from a BitmapData canvas.
- BitmapData#generateTexture now has an optional callback argument. Most browsers now load the generated image asynchronously, so without a callback you're not guaranteed a valid texture (#136).
- Phaser.GameObjectFactory#weapon (used as
game.add.weapon
) now has abulletClass
argument. Without this it was difficult to setbulletClass
before creating the bullet pool.
Updates
- Phaser.Cache#addImage now emits a warning if you add an image that hasn't completed loading.
- Phaser.Frame now emits a warning if a Frame is constructed with a zero width or height.
- Phaser.Physics.Arcade#velocityFromAngle now uses Phaser.Math instead of
game.math
, so you can use it without a reference to a running game (#131). - Clarified Emitter#start documentation. It's really easier to use Emitter#explode or Emitter#flow.
- The game canvas's cursor style is now
pointer
when the cursor is over an object withinput.useHandCursor
enabled and empty at all other times. This should make it easier to set your own cursor style for the game (#110). - TypeScript definitions fixes and updates (#75, #101, #107)
- Docs typo fixes (#101)
- Added photonstorm/phaser-plugins to the Phaser CE docs: see Phaser.Plugin (#107)
- BitmapData and RenderTexture objects are now destroyed when clearing the cache (#68). This should reduce memory use.
Bug Fixes
- Fixed an issue where a display object's preUpdate call would be skipped if a sibling was removed or destroyed, which could create small discrepancies in position, lifespan, or renderOrderID (#103).
- Fixed an issue where display objects using the default texture could have an incorrect size (1×1) and appear blank (#138). The built-in DEFAULT and MISSING textures are now loaded asynchronously to ensure that they're valid.
- Fixed an issue where game.device.canUseMultiply could hold a false negative on first (Firefox, Safari) or even subsequent (Chrome 57) page loads, disabling most blend modes when using the Canvas renderer (#130).
- Phaser.Keyboard#lastChar is now
null
if Phaser has recorded no key presses yet. Reading it before a key press no longer raises an error (#132). - Previously, the
center
of a moving Arcade Physics Body was inaccurate during the game's update phase, and that made collision checks of circular Bodies less accurate (#122). This was fixed by updatingcenter
during preUpdate. - Fixed an issue when dragging a sprite whose parent is scaled or rotated (#108). Now the sprite follows the cursor correctly.
- Fixed audio skipping when restarting playback (#78)
- Fixed bad rendering of multiple tinted BitmapText objects (#58)
- Fixed Object.assign not existing on older devices (#81)
- Previously, the HEADLESS renderer essentially became a CANVAS renderer after boot, which was incorrect (#74). Phaser.HEADLESS now sets up a PIXI.CanvasRenderer and a detached (invisible) canvas. It skips
render
hooks but not thepreRender
andpostRender
hooks (strange). game.renderType now contains either Phaser.CANVAS, Phaser.HEADLESS, or Phaser.WEBGL after boot.
Thanks
@alexus85, @Arcanorum, @digitsensitive, @Dreaded-Gnu, @hdodov, @IVA-apps, @JTronLabs, @Lightning3105, @mikewesthad, @nalgorry, @photonstorm, @qarlosh, @samme, @trpzn, @vpmedia
Phaser CE 2.7.5
Version 2.7.5 - 23rd March 2017
- A hotfix to patch the error
this.preUpdateLifeSpan is not a function
in 2.7.4 (#72)
Version 2.7.4 - 23rd March 2017
New Features
- New method Phaser.Math.hypot() calculates the length of the hypotenuse spanning two given lengths
- Added copyBitmapData function to Phaser.Bitmap
- Added noPause logic to src/input/Pointer.js
- Added timeStep parameter pass to state.pauseUpdate call at src/core/Game.js
- Added
tileOffset
(Phaser.Point
) property toPhaser.TilemapLayer
. This allows offsetting layer positions in a way that plays well with the camera and Arcade physics. Also, theoffsetx
andoffsety
properties are now read from the layer properties of Tiled maps.
Updates
- Changed Loader.loadImageTag behavior to exclude firefox from loading cached images (#2534)
- Added yarn lock file
- Added travis-ci build script
- Fixed Phaser.Plugin.AStar Typescript definitions and phaser-ce module name to get
grunt tsdocs
to work again (#33) - Fixed Phaser.Plugin.AStar.DISTANCE_MANHATTAN according to documentation
- Changed bower package name to
phaser-ce
- Emitter.explode() now launches all particles if the
quantity
argument is omitted (#7). You should pass quantity0
if you want to launch no particles. overlapR
,overlapX
, andoverlapY
are now reset to 0 when an Arcade Physics Body isn't colliding (#23)- Extened Phaser.Physics.P2.Body.loadPolygon() method by scale parameter, that allows the loaded polygon to have a different scale
- Fixed documentation of Phaser.Video#createVideoFromBlob
- Clarify documentation of Phaser.AnimationManager#updateIfVisible
- Update Phaser.Text#setStyle to not mutate the passed style
- Extended Phaser.Particles.Arcade.Emitter#makeParticles by parameter to pass custom parameters to particle class
- Fixed jshint issues (#46)
- Added call of preUpdateLifeSpan for Phaser.Image#preUpdate (#46)
- Added missing parameter particleArguments at typescript definition file (#46)
- Updated changes at readme and changelog markdown (#69)
Bug Fixes
- Fixed Arcade.Body.reset() so it resizes the body if the sprite scale has changed (#10).
- Fixed Phaser.Camera.checkBounds() so it doesn't flicker when its view is bigger than its bounds.
- Fixed Phaser.Math#between and Phaser.Math#random to work again
- Reset loader state at Phaser.Loader before complete callbacks (#53)
- Fixed rendering on devices that use older versions of javascript
- Fixed crashes on very old devices
- Phaser.Group#update Fixed group updating if a sprite has been destroyed
- Phaser.Weapon#fire Fix local rotation tracking (#66)
- Fixed memory leak on webaudio at Phaser.Sound
Pixi Updates
- Fix wrong parameter by calling Phaser.RenderTexture in pixi _generateCachedSprite at DisplayObject
- Fixed jshint issues
- Added preUpdateLifeSpan for Image
- Added missing parameter particleArguments at typescript definition file
- Fixed duplicate touch events in Android Chrome >= 55 due to introduction of PointerEvents.
Phaser CE 2.7.4
Version 2.7.4 - 23rd March 2017
New Features
- New method Phaser.Math.hypot() calculates the length of the hypotenuse spanning two given lengths
- Added copyBitmapData function to Phaser.Bitmap
- Added noPause logic to src/input/Pointer.js
- Added timeStep parameter pass to state.pauseUpdate call at src/core/Game.js
- Added
tileOffset
(Phaser.Point
) property toPhaser.TilemapLayer
. This allows offsetting layer positions in a way that plays well with the camera and Arcade physics. Also, theoffsetx
andoffsety
properties are now read from the layer properties of Tiled maps.
Updates
- Changed Loader.loadImageTag behavior to exclude firefox from loading cached images (#2534)
- Added yarn lock file
- Added travis-ci build script
- Fixed Phaser.Plugin.AStar Typescript definitions and phaser-ce module name to get
grunt tsdocs
to work again (#33) - Fixed Phaser.Plugin.AStar.DISTANCE_MANHATTAN according to documentation
- Changed bower package name to
phaser-ce
- Emitter.explode() now launches all particles if the
quantity
argument is omitted (#7). You should pass quantity0
if you want to launch no particles. overlapR
,overlapX
, andoverlapY
are now reset to 0 when an Arcade Physics Body isn't colliding (#23)- Extened Phaser.Physics.P2.Body.loadPolygon() method by scale parameter, that allows the loaded polygon to have a different scale
- Fixed documentation of Phaser.Video#createVideoFromBlob
- Clarify documentation of Phaser.AnimationManager#updateIfVisible
- Update Phaser.Text#setStyle to not mutate the passed style
- Extended Phaser.Particles.Arcade.Emitter#makeParticles by parameter to pass custom parameters to particle class
- Fixed jshint issues (#46)
- Added call of preUpdateLifeSpan for Phaser.Image#preUpdate (#46)
- Added missing parameter particleArguments at typescript definition file (#46)
- Updated changes at readme and changelog markdown (#69)
Bug Fixes
- Fixed Arcade.Body.reset() so it resizes the body if the sprite scale has changed (#10).
- Fixed Phaser.Camera.checkBounds() so it doesn't flicker when its view is bigger than its bounds.
- Fixed Phaser.Math#between and Phaser.Math#random to work again
- Reset loader state at Phaser.Loader before complete callbacks (#53)
- Fixed rendering on devices that use older versions of javascript
- Fixed crashes on very old devices
- Phaser.Group#update Fixed group updating if a sprite has been destroyed
- Phaser.Weapon#fire Fix local rotation tracking (#66)
- Fixed memory leak on webaudio at Phaser.Sound
Pixi Updates
- Fix wrong parameter by calling Phaser.RenderTexture in pixi _generateCachedSprite at DisplayObject
- Fixed jshint issues
- Added preUpdateLifeSpan for Image
- Added missing parameter particleArguments at typescript definition file
- Fixed duplicate touch events in Android Chrome >= 55 due to introduction of PointerEvents.
Phaser CE 2.7.3
v2.7.3 Phaser CE 2.7.3 release.