Skip to content

Releases: phaserjs/phaser

"Allorallen"

11 Apr 12:34
Compare
Choose a tag to compare

Updates

  • Updated to Pixi.js 1.5.2
  • Updated to p2.js 0.5.0
  • Return the result of P2.Body.setCircle for further chaining and manipulation (fix #659)
  • Updated the PhysicsEditor plugin to maintain position, radius, mask bits, category bits and sensor flags (thanks @georgiee, #674)
  • Further TypeScript defs tweaks (thanks @clark-stevenson)
  • Lowered the default size of SpriteBatch from 10000 to 2000 as this yields faster results on mobile (pixi.js update)
  • Fix for 'jagged' strokes on custom fonts (thanks @nickryall, #677)
  • The State.update function (and thus the update of any sub-classed Sprites or other objects) is now called before Stage, Tweens, Sound, Input, etc (#662)
  • The Phaser jshint process is now running on Travis (thanks @xtian, #656)
  • The Phaser Gruntfile is now split up into option tasks (thanks @xtian, #638)
  • Key.reset now clears any callbacks associated with the onDown and onUp events and nulls the onHoldCallback if set. Key.reset is called by Keyboard.reset when changing state.
  • If you pass null to Tilemap.putTile as the tile parameter it will pass the call over to Tilemap.removeTile.
  • TypeScript definitions updated for latest changes (thanks @clark-stevenson)
  • Keyboard.stop nulls the function references after removing the event listeners (thanks @bmceldowney, #691)
  • Tilemap.hasTile allows for multi-layer type parameter (thanks @Raeven0, #680)
  • Grunt update to dev dependencies (thanks @xtian, #695)
  • Emitter now emits Phaser.Particle objects instead of Phaser.Sprites, which can be extended as required.
  • Emitter has had various local properties removed that were already declared in Phaser.Group which it extends.
  • PluginManager parent parameter removed as it's redundant. Also most core functions tidied up and jsdocs fixed.
  • p2.World.defaultRestitution has been deprecated and is now p2.World.restitution.
  • p2.World.defaultFriction has been deprecated and is now p2.World.friction.
  • p2.World now uses 4 bodies for the world boundaries, rather than 1 body with 4 shapes. This stops the bounds triggering narrowphase with every single body in the world.
  • p2.World bounds are now included in the callback events such as beginContact and impact events.
  • Thanks to @stuff the Classes drop-down list in the API docs now indents the sub-classes.

New Features

  • Added ability to retrieve a single p2 fixture from the cache (thanks @georgiee, #674)
  • Timers can now have a start delay value (thanks @georgiee, #660)
  • CacheAsBitmap added to Display Object, so works for Sprite, Image, Button. Allows you to cache complex display hierarchies for speed.
  • CacheAsBitmap added to Graphics Object. Allows you to cache complex graphics structures hierarchies for speed.
  • Added generateTexture function to display objects. Create a texture from the current object display hierarchy for use as a texture elsewhere.
  • Added optional FilterArea to display object (for optimisation)
  • Graphics chaining functions.
  • Added Pointer.positionUp which records the last point at which the pointer left the screen (thanks @Cryszon, #676)
  • Phaser.Point.centroid static function added to calculate the centroid or midpoint of an array of points (thanks @lewster32, #675)
  • SoundManager.remove(sound) now lets you remove a sound from the SoundManager, destroying it in the process.
  • Sound.destroy will remove a sound and all local references it holds, optionally removing itself from the SoundManager as well.
  • SoundManager.removeByKey(key) will remove all sounds from the SoundManager that have a key matching the given value.
  • ArcadePhysics.Body.hitTest(x, y) will return a boolean based on if the given world coordinate are within the Body or not.
  • StateManager.restart allows you to quickly restart the current state, optionally clearing the world and cache.
  • Tilemap.removeTile(x, y, layer) lets you remove the tile at the given coordinates and updates the collision data.
  • Tilemap.removeTileWorldXY lets you remove the tile at the given pixel value coordinates and updates the collision data.
  • Key.enabled boolean allows you to toggle if a Key processes its update method or dispatches any events without deleting and re-creating it.
  • Emitter now has minParticleAlpha and maxParticleAlpha values for setting a random alpha on emitted particles.
  • Emitter.particleAnchor allows you to control the anchor of emitted Particles. Defaults to 0.5 (same as before) but now under your control.
  • Emitter.setAlpha allows you to quickly set the min and max alpha values.
  • Emitter.setScale allows you to quickly set the min and max scale values.
  • Emitter.blendMode lets you set the blendMode of any emitted Particle (needs a browser that supports canvas blend modes)
  • Group.customSort allows you to sort the Group children based on your own sort function.
  • Emitter.setScale has a new 'rate' parameter which allows particles to change in scale over time, using any Easing value or timescale.
  • Emitter.setScale now allows you to scale the x and y axis of the particles independently.
  • Emitter.setAlpha has a new 'rate' parameter which allows particles to change alpha over time, using any Easing value or timescale.
  • Emitter.bringToTop and Emitter.sendToBack are booleans that let you optionally set the display order of the Particle when emitted.
  • Emitter now calls the Phaser.Particle.onEmit function, which is left empty for you to override and add in custom behaviours.
  • p2.World has a new contactMaterial property, which can be configured like a normal P2 Contact Material and is applied when two bodies hit that don't have defined materials.
  • Group.remove has a new 'destroy' parameter (false by default), which will optionally call destroy on the item removed from the Group.
  • Group.removeAll has a new 'destroy' parameter (false by default), which will optionally call destroy on the items removed from the Group.
  • Group.removeBetween has a new 'destroy' parameter (false by default), which will optionally call destroy on the items removed from the Group.
  • @georgiee created a new P2.FixtureList class to allow easy access the fixtures of a created P2 Body:

This is especially useful in combination with PhysicsEditor and P2.Body#addPhaserPolygon.

You can configure your whole collision grouping in PhysicsEditor and then you can later change the mask bits easily with this class. You can also access parts (groups) and named fixtures by a group index or a fixture key - both properties can be set in PhysicsEditor with the custom phaser exporter.

Use cases:

  • Configure collision bits in PhysicsEditor and you want to change them later.
  • Place a sensor in your fixture and access this single fixture later (to disable temporarily)
  • Create a small body with threes fixtures (circle, circle + polygon/convex). Now you want that the polygon part to behave like rubber and assign a bouncing (restitution > 1) material. Assign a fixture key in PhysicsEditor and access the fixture like this. (see the image for the fixture I described)

Bug Fixes

  • If you inputEnable = false a gameobject you couldn't re-enable it again using inputEnable = true, only directly via the handler (thanks @nickrall, fix #673)
  • Fixed setTexture bug with TilingSprite (pixi.js 1.5.2 bug fix)
  • Fixed anchor point bug in canvas with TilingSprite (pixi.js 1.5.2 bug fix)
  • Fixed positionOffset not begin correct in TilingSprite (pixi.js 1.5.2 bug fix)
  • Fixed issue where filters were not being applied to TilingSprite (pixi.js 1.5.2 bug fix)
  • Fixed SpriteBatch canvas transform bug (pixi.js 1.5.2 bug fix)
  • Fixed Cached textures issue when using base64 encoded images (@cacheflowe) (pixi.js 1.5.2 bug fix)
  • Fixed issue where visibility was not being respected in sprite batch (pixi.js 1.5.2 bug fix)
  • Fixed bug in gl.bindTexture which tried to use an undefined private var. (@photonstorm) (pixi.js 1.5.2 bug fix)
  • Fixed the 'short cut' version of Math.floor in setTransform if roundPixels is true. (@photonstorm) (pixi.js 1.5.2 bug fix)
  • SoundManager.boot will check to see if the AudioContext was created before carrying on (thanks @keyle, fix #669)
  • Fixed bug where move up and move down method in groups did not work (thanks @jonthulu, fix #684)
  • Fixed bug in Group.next when cursor is at the last child (thanks @jonthulu, fix #688)
  • Emitter.minParticleScale and maxParticleScale wasn't resetting the Body size correctly.
  • Group.removeBetween now properly iterates through the children.
  • P2.World had a type in the restitution method title. Now fixed.
  • Objects with an InputHandler now deactivate it when the object is removed from a Group but not destroyed (fix #672)
  • Fixed the vectors used in the BlurX and BlurY filters (thanks @nickryall, fix #668)

p2.js v0.5.0

  • Added property .enableIslandSleeping to World.
  • Added property .useFrictionGravityOnZeroGravity to World.
  • Renamed .useWorldGravityForFrictionApproximation in World to .useWorldGravityAsFrictionGravity to keep things more uniform.
  • Sleep improvements.
  • Added property .frictionIterations to GSSolver, and removed .skipFrictionIterations.
  • Upgraded to gl-matrix 2.1.0.
  • Removed QuadTree.
  • Removed mat2.
  • Added Utils.extend.
  • Added methods .setStiffness and .setRelaxation methods to Constraint.
  • Removed properties .stiffness, .relaxation and .useGlobalEquationParameters from GSSolver.
  • Added methods .setGlobalStiffness, .setGlobalRelaxation, .setGlobalEquationParameters to World.
  • Renamed property .eps to .epsilon for Equation.
  • Removed property .useBoundingBoxes from NaiveBroadphase in favor of the new property .boundingVolumeType in Broadphase.
  • Added methods .getMaxForce and .setMaxForce to LockConstraint.
  • Changed property names .bi, .bj, .ni, .ri, .rj to .bodyA, .bodyB, .normalA, .contactPointA, .contactPointB in Equation, ContactEquation and FrictionEquation classes.
  • Removed IslandSolver in favor of ...
Read more

"Ghealdan"

28 Mar 01:56
Compare
Choose a tag to compare

Bug Fixes

  • Sprite would glitch if it had an ArcadePhysics Body that was re-positioned out of loop.
  • Sprite would "fly off" if it had an ArcadePhysics Body that was re-positioned during an input handler.
  • Tween.generateData would enter an eternal loop if the total resulted in a float. Now wrapped in Math.floor.
  • ArcadePhysics.Body preUpdate has been modified to stop Sprites with non-1 scaling from gaining delta and moving off the screen (fix #644).
  • ArcadePhysics.Body deltaMaxY wasn't being correctly applied.
  • P2.World - Removing tilemap layer retrieval for object layers in convertCollisionObjects() (thanks bmceldowney, fix #653)
  • Calling Keyboard.stop() wouldn't let you call Keyboard.start() later on in the same game

Updated

  • The "Build your First Phaser Game" Tutorial has been updated for Phaser 2
  • Line.fromSprite now sets "fromCenter" to false by default as Sprite.center is deprecated in 2.x. Documentation and Examples updated to reflect this.
  • All the documentation has been re-published for 2.0.2.
  • Lots of ArcadePhysics.World methods have been marked as private where they shouldn't be called directly (separateX, etc)
  • xtian jshint fixed nearly every single file in the repository!

New Features

  • Sprite.overlap lets you quickly check to see if the bounds of two display objects are intersecting or not, without having to use a physics system.
  • Keyboard.destroy will now clear all event listeners and any custom set callbacks or Keys.

"Lyrelle"

24 Mar 12:21
Compare
Choose a tag to compare

The 2.0.1 release of Phaser is mostly a maintenance release. With 2.0 being such a significant upgrade there were bound to be some issues, and this release addresses them. One of the core things a lot of you kept telling us was that you need Arcade Physics to work pretty much exactly as it did in the past. So in 2.0.1 we've taken ArcadePhysics back another iteration, fixed a few of the most common complaints you had with it, and fixed every single physics example as well.

2.0.1 also brings the TypeScript definitions virtually bang up to date, covering P2 and Ninja physics, Arcade updates and more. Our thanks to Clarke for his continued support of these.

There are a few new features as well including a Phaser export script for PhysicsEditor (found in the resources folder), updates to the Particle Emitter and device enhancements. As always if you find a bug that you can confirm with a test case, please report it to us via github. If you think you may have found a bug, but aren't quite sure, please post it to the forum first.

"Aes Sedai"

14 Mar 06:47
Compare
Choose a tag to compare

Phaser 2.0.0 is a major upgrade to the Phaser Game Framework. With significant improvements across the whole library it's our biggest and fastest release yet. Please see the README for full details, the Migration Guide for help porting a 1.x game across and our new Examples repository.

Shienar

24 Feb 01:34
Compare
Choose a tag to compare

New Examples:

  • Added lovely new little mini golf game by jpcloud.

Updates:

  • Loader can now load JSON files natively (thanks lucas)
  • TilemapParser now errors if the tileset isn't the right size

Bug Fixes:

  • Updated Physics.Body.applyDamping so that velocity is reduced down to zero properly (thanks caezs)
  • ArcadePhysics.collideSpriteVsTilemapLayer wouldn't call the process or collide callbacks if only 1 tile was involved in the check (thanks mandarinx)
  • Lots of documentation fixes (thanks nhowell)
  • Fix for PixiPatch so it renders masks again (thanks georgios)
  • Modified ArcadePhysics.intersects so it returns a value as well as asigns (thanks bunnyhero)
  • Lots of TypeScript defs fixes (thanks clark)

Saldaea

12 Feb 15:40
Compare
Choose a tag to compare

This 1.1.5 release is released to address issues in 1.1.4 that we didn't want you to have to wait too long for.

  • Explicitly paused Timer continues if you un-focus and focus the browser window (thanks georgiee)
  • Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception (thanks georgiee)
  • Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy)
  • Added SAT.js to TypeScript definition. Now compiles properly.
  • Added missing Line.js to the Grunt file.
  • Tilemap#paste diffX and diffY equations changed, fixed issue #393 (thanks brejep)
  • Added missing return value in Body.hitLeft and hitRight, fixes issue #398 (thanks ram64).
  • Fixed easing tween example case. Issue #379 (thanks wesleywerner)
  • Removed SAT.js UMD wrapped, fixes issue #361 (thanks luizbills)
  • Removed inContact check from Body.separate.
  • Fixed Tilemap docs (wrongly pointed to Tileset methods)

Kandor

07 Feb 04:55
Compare
Choose a tag to compare
Merge branch 'origin/dev'

Conflicts:
	README.md

Arafel

07 Feb 04:52
Compare
Choose a tag to compare
1.1.3

Final version of the Getting Started guide.