|
2 | 2 |
|
3 | 3 | There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) available for those converting from Phaser 1.x to 2.x. In the guide we detail the API breaking changes and approach to our new physics system. |
4 | 4 |
|
| 5 | +## Version 2.0.5 - "Tanchico" - 20th May 2014 |
| 6 | + |
| 7 | +### Updates |
| 8 | + |
| 9 | +* TypeScript definitions fixes and updates (thanks @luispedrofonseca @clark-stevenson @Anahkiasen @adamholdenyall @luispedrofonseca @WillHuxtable) |
| 10 | +* Input.getPointerFromIdentifier docs update to reflect where the identifier comes from. Pointer properties now set to give it fixed defaults (thanks @JirkaDellOro, #793) |
| 11 | +* Pointer.pointerId added which is set by the DOM event (if present in the browser). Note that browsers can and do recycle pointer IDs. |
| 12 | +* Pointer.type and Pointer.exists properties added. |
| 13 | +* QuadTree.retrieve can now accept either a Sprite with a physics body or a Phaser.Rectangle as its parameter. |
| 14 | +* PluginManager.add now accepts additional parameters and if given a function it will pass them all to the Plugin constructor. |
| 15 | +* Tilemap.getTile has a new nonNull parameter. If true it won't return `null` for empty tiles, but will return the actual Tile in that location. |
| 16 | +* Math.interpolateAngles and Math.nearestAngleBetween have been removed for the time being. They threw run-time errors previously. |
| 17 | +* PIXI.InteractionManager is no longer over-written if the object already exists (thanks @georgiee, #818) |
| 18 | +* Key.justPressed and justReleased incorrectly set the delay value to 2500ms. Now defaults to 50ms (thanks @draklaw, fix #797) |
| 19 | +* Stage.backgroundColor can now accept short-code hex values: `#222`, `#334`, etc. |
| 20 | +* Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves. |
| 21 | +* Stage.bounds is now updated if the game canvas offset changes position. Note that it contains the un-scaled game dimensions. |
| 22 | + |
| 23 | +### New Features |
| 24 | + |
| 25 | +* New `force` parameter added to Group.set, setAll, setAllChildren, setProperty which controls if a property is created even if it doesn't exist. |
| 26 | +* Group.hasProperty will check a child for the given property and return true if it exists, otherwise false. |
| 27 | +* Phaser.Tween.from allows you to set tween properties that will end up where the current object is (thanks @codevinsky, #792) |
| 28 | +* Input.getPointerFromId will return a pointer with a matching pointerId value, if any. pointerId is a value set by the browser in the DOM event. |
| 29 | +* ArcadePhysics.getObjectsUnderPointer will return all children from a Group that overlap with the given Pointer. |
| 30 | +* InputManager.minPriorityID lets you set the minimum priority level an object needs to be to be checked by a Pointer. Useful for UI layer stacking. |
| 31 | +* New consts: Phaser.Tilemap.NORTH, SOUTH, EAST and WEST to use with plugins and generally just handy to have. |
| 32 | +* BitmapData.processPixelRGB added undefined check (thanks @muclemente, fix #808) |
| 33 | +* Phaser.Utils.transposeArray will transpose the given array and return it. |
| 34 | +* Phaser.Utils.rotateArray will rotate the given array by 90 or 180 degrees in either direction and return it. |
| 35 | +* BitmapData.rect provides a quick way to draw a Rectangle to a BitmapData. |
| 36 | +* Button.onOverMouseOnly is a boolean that causes onOver events to fire only if the pointer was a mouse (i.e. stops onOver sounds triggering on touch) |
| 37 | +* Tilemap.setCollision has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819) |
| 38 | +* Tilemap.setCollisionBetween has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819) |
| 39 | +* Tilemap.setCollisionByExclusion has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819) |
| 40 | +* Tilemap.setCollisionByIndex has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819) |
| 41 | +* Graphics.drawTriangles will draw an array of vertices to the Graphics object (thanks @codevinsky, #795) |
| 42 | +* Polygon.area will calculate the area of the Polygon (thanks @codevinsky, #795) |
| 43 | +* The Tiled JSON parser will now include Tiled polygons, ellipse and rectangle geometry objects in the resulting map data (thanks @tigermonkey, #791) |
| 44 | +* Input.addMoveCallback allows you to bind as many callbacks as you like to the DOM move events (Input.setMoveCallback is now flagged as deprecated) |
| 45 | +* Input.deleteMoveCallback will remove a previously set movement event callback. |
| 46 | +* Mouse will now check if it's over the game canvas or not and set Pointer.withinGame accordingly. |
| 47 | +* Mouse.mouseOutCallback callback added for when the mouse is no longer over the game canvas. |
| 48 | +* Mouse.stopOnGameOut boolean controls if Pointer.stop will be called if the mouse leaves the game canvas (defaults to false) |
| 49 | +* Tilemap.searchTileIndex allows you to search for the first tile matching the given index, with optional skip and reverse parameters. |
| 50 | +* Tilemap.layer is a getter/setter to the current layer object (which can be changed with Tilemap.setLayer) |
| 51 | +* Cache.checkKey added - allows you to pass in a Cache type and a key and return a boolean. |
| 52 | +* Cache.checkCanvasKey(key) - Check if a Canvas key exists in the cache (thanks to @delta11 for the proposal) |
| 53 | +* Cache.checkTextureKey(key) - Check if a Texture key exists in the cache (thanks to @delta11 for the proposal) |
| 54 | +* Cache.checkSoundKey(key) - Check if a Sound key exists in the cache (thanks to @delta11 for the proposal) |
| 55 | +* Cache.checkTextKey(key) - Check if a Text key exists in the cache (thanks to @delta11 for the proposal) |
| 56 | +* Cache.checkPhysicsKey(key) - Check if a Physics key exists in the cache (thanks to @delta11 for the proposal) |
| 57 | +* Cache.checkTilemapKey(key) - Check if a Tilemap key exists in the cache (thanks to @delta11 for the proposal) |
| 58 | +* Cache.checkBinaryKey(key) - Check if a Binary key exists in the cache (thanks to @delta11 for the proposal) |
| 59 | +* Cache.checkBitmapDataKey(key) - Check if a BitmapData key exists in the cache (thanks to @delta11 for the proposal) |
| 60 | +* Cache.checkBitmapFontKey(key) - Check if a BitmapFont key exists in the cache (thanks to @delta11 for the proposal) |
| 61 | +* Cache.checkJSONKey(key) - Check if a JSON key exists in the cache (thanks to @delta11 for the proposal) |
| 62 | +* New movement data added for a Pointer Locked mouse (Pointer.movementX/Y) (thanks @woutercommandeur, #831) |
| 63 | +* ScaleManager.bounds is a Rectangle object that holds the exact size of the game canvas, taking DOM offset and game scale into account. |
| 64 | + |
| 65 | +### Plugins |
| 66 | + |
| 67 | +The Plugins have now all moved to [their own repository](https://github.com/photonstorm/phaser-plugins) |
| 68 | + |
| 69 | +### Bug Fixes |
| 70 | + |
| 71 | +* Line.pointOnLine corrected algorithm (thanks @woutercommandeur, fix #784) |
| 72 | +* Line segment collision fails under certain cicumstances (thanks @woutercommandeur, fix #760) |
| 73 | +* The P2 DistanceConstraint method signature has changed. Updated Phaser so maxForce is now passed as object (fix #788) |
| 74 | +* Moved the this._reversed flag outside of the property loop in Tween (as per tween.js issue 115) |
| 75 | +* Emitter.makeParticles updated to use Array.isArray() check on the key/frame values, so non-string objects can be passed in (thanks @AnderbergE, fix #786) |
| 76 | +* Tilemap.createFromObjects will now force the creation of the property again even if it doesn't exist (regression fix from 2.0.4) |
| 77 | +* Phaser.Line.intersectsPoints fixed by properly checking the boundaries (thanks @woutercommandeur, fix #790) |
| 78 | +* Group.set and setAll were changed in 2.0.4 to not create the property unless it existed. This broke backwards compatibility, so has been fixed. |
| 79 | +* Sound.play now returns the Sound object (thanks @AnderbergE, fix #802) |
| 80 | +* Device Silk UA test updated to avoid Safari conflict (thanks @jflowers45, fix #810) |
| 81 | +* Sound.stop on Samsung S4 would randomly throw a DOM error. Wrapped the audio stop in a try/catch (thanks FSDaniel) |
| 82 | +* RandomDataGenerator.integerInRange would return a non-integer value if you passed in a float. |
| 83 | +* Timer class updated so that code-resumed pauses don't mess up the internal _pausedTotal value (thanks @joelrobichaud, fix #814) |
| 84 | +* Timer class when paused by code after a game-level pause wouldn't set the codepaused flag (thanks @joelrobichaud, fix #814) |
| 85 | +* Stage.backgroundColor now properly accepts hex #RRGGBB and color values 0xRRGGBB again (fix #785) |
| 86 | +* Color.getRGB would return incorrect color components if a color value without alpha was given, now works with both 0xRRGGBB and 0xAARRGGBB. |
| 87 | +* Color.getWebRGB now works regardless if you give an 0xRRGGBB or 0xAARRGGBB color value. |
| 88 | +* If an object was drag enabled with bringToTop, the onDragStop event wouldn't fire until the mouse was next moved (thanks @alpera, fix #813) |
| 89 | +* RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi. |
| 90 | +* RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi. |
| 91 | +* Group.hasProperty fixed to not use hasOwnProperty, but a series of `in` checks (thanks @mgiuffrida for the idea, #829) |
| 92 | +* Tilemap.removeTile sets tiles to null but should set to index of -1 (thanks @draklaw, fix #835) |
| 93 | + |
5 | 94 | ## Version 2.0.4 - "Mos Shirare" - 29th April 2014 |
6 | 95 |
|
7 | 96 | ### Updates |
|
0 commit comments