Commit graph

610 commits

Author SHA1 Message Date
photonstorm
86c228d380 Group.destroy now removes any set filters (thanks @Jmaharman fix #844) 2014-05-26 20:13:00 +01:00
photonstorm
c5d9f12858 BitmapData.alphaMask has 2 new optional parameters: sourceRect and maskRect to give more fine-grained control over where the source and mask are drawn and their size
BitmapData.draw now has two optional parameters: width and height, to let you stretch the image being drawn if needed.
2014-05-24 03:58:00 +01:00
photonstorm
7846da7c90 BitmapData.alphaMask 'mask' parameter is now optional, if not given it will use itself as the mask.
BitmapData.alphaMask now calls BitmapData.update after running.
2014-05-24 03:17:58 +01:00
photonstorm
6e9c9c10b8 BitmapData.alphaMask can now also take a Phaser.Sprite, Phaser.Image or BitmapData object as a source type.
BitmapData.alphaMask has 4 new optional parameters: x, y, x2 and y2 to control exactly where the source and mask images are drawn.
2014-05-24 03:15:13 +01:00
photonstorm
f3ef3aed19 BitmapData.draw can now take a BitmapData object as a source type. 2014-05-24 02:43:59 +01:00
photonstorm
934f6a816c BitmapData.resize now properly updates the baseTexture and texture dimensions. 2014-05-24 02:02:49 +01:00
photonstorm
7b696dddfe BitmapData.extract has 4 new parameters: r2, g2, b2, a2 which let you re-color the extract pixels as they are drawn to the new BitmapData.
BitmapData.load will take a game object or string and resize the BitmapData to match it and then draw the pixels in.
2014-05-24 01:29:47 +01:00
photonstorm
bcddfc83c0 Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841) 2014-05-21 21:48:29 +01:00
photonstorm
2a73652ed8 Preparing for 2.0.6 "Jornhill" development. 2014-05-20 10:56:45 +01:00
photonstorm
560a44f06e README fixes for 2.0.5 release. 2014-05-20 10:37:51 +01:00
photonstorm
43e079a53a Readme update. 2014-05-20 10:31:55 +01:00
photonstorm
8f07796af3 2.0.5 readme updates. 2014-05-20 10:03:02 +01:00
photonstorm
7b876d5fc4 ScaleManager.bounds is a Rectangle object that holds the exact size of the game canvas, taking DOM offset and game scale into account.
Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves.
Stage.bounds is now updated if the game canvas offset changes position. Note that it gives the un-scaled game dimensions.
2014-05-19 18:49:59 +01:00
photonstorm
c9656e48de Group.hasProperty fixed to not use hasOwnProperty, but a series of in checks (thanks @mgiuffrida for the idea, #829) 2014-05-19 13:11:58 +01:00
photonstorm
1a7305b0ad New movement data added for a Pointer Locked mouse (Pointer.movementX/Y) (thanks @woutercommandeur, #831) 2014-05-19 11:51:25 +01:00
photonstorm
da75a22e82 Cache.checkKey added - allows you to pass in a Cache type and a key and return a boolean.
Cache.checkCanvasKey(key) - Check if a Canvas key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextureKey(key) - Check if a Texture key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkSoundKey(key) - Check if a Sound key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextKey(key) - Check if a Text key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkPhysicsKey(key) - Check if a Physics key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTilemapKey(key) - Check if a Tilemap key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBinaryKey(key) - Check if a Binary key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapDataKey(key) - Check if a BitmapData key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapFontKey(key) - Check if a BitmapFont key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkJSONKey(key) - Check if a JSON key exists in the cache (thanks to @delta11 for the proposal)
2014-05-19 11:34:14 +01:00
photonstorm
cfadaf3e70 Tilemap.layer is a getter/setter to the current layer object (which can be changed with Tilemap.setLayer) 2014-05-15 22:30:32 +01:00
photonstorm
1d13855abb Tilemap.searchTileIndex allows you to search for the first tile matching the given index, with optional skip and reverse parameters. 2014-05-15 19:56:56 +01:00
photonstorm
2650e6c47e RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
2014-05-15 15:32:59 +01:00
Richard Davey
21011c3d03 mouseout handler 2014-05-14 22:56:42 +01:00
photonstorm
5d8a11ae29 Input.addMoveCallback allows you to bind as many callbacks as you like to the DOM move events (Input.setMoveCallback is now flagged as deprecated)
Input.deleteMoveCallback will remove a previously set movement event callback.
2014-05-14 03:01:24 +01:00
photonstorm
b90bcc442c If an object was drag enabled with bringToTop, the onDragStop event wouldn't fire until the mouse was next moved (thanks @alpera, fix #813) 2014-05-14 02:42:55 +01:00
photonstorm
cc9a234c8c Color.getRGB would return incorrect color components if a color value without alpha was given, now works with both 0xRRGGBB and 0xAARRGGBB.
Color.getWebRGB now works regardless if you give an 0xRRGGBB or 0xAARRGGBB color value.
2014-05-14 02:09:44 +01:00
photonstorm
798d7a4fd1 Stage.backgroundColor now properly accepts hex #RRGGBB and color values 0xRRGGBB again (fix #785) 2014-05-14 01:59:21 +01:00
photonstorm
0bfa249ed5 Key.justPressed and justReleased incorrectly set the delay value to 2500ms. Now defaults to 50ms (thanks @draklaw, fix #797) 2014-05-14 00:24:09 +01:00
photonstorm
8d8c3cb595 The Tiled JSON parser will now include Tiled polygons, ellipse and rectangle geometry objects in the resulting map data (thanks @tigermonkey, #791) 2014-05-14 00:10:08 +01:00
photonstorm
b2c68c1369 Graphics.drawTriangles will draw an array of vertices to the Graphics object (thanks @codevinsky, #795)
Polygon.area will calculate the area of the Polygon (thanks @codevinsky, #795)
2014-05-14 00:04:31 +01:00
photonstorm
6f1ba28b73 README updates. 2014-05-13 23:43:44 +01:00
photonstorm
5047606118 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) 2014-05-13 23:43:44 +01:00
photonstorm
0d2fa2733a Timer class updated so that code-resumed pauses don't mess up the internal _pausedTotal value (thanks @joelrobichaud, fix #814)
Timer class when paused by code after a game-level pause wouldn't set the codepaused flag (thanks @joelrobichaud, fix #814)
2014-05-09 16:41:48 +01:00
photonstorm
86f6b114e8 Sound.stop on Samsung S4 would randomly throw a DOM error. Wrapped the audio stop in a try/catch (thanks FSDaniel) 2014-05-09 16:39:45 +01:00
photonstorm
c32706f98c Phaser.Utils.transposeArray will transpose the given array and return it.
Phaser.Utils.rotateArray will rotate the given array by 90 or 180 degrees in either direction and return it.
2014-05-08 02:17:37 +01:00
photonstorm
5eb7ae2cb0 Plugins moved to their own new repo. 2014-05-08 01:57:21 +01:00
photonstorm
410bc389ed Tidying up ready to move the plugins to their own repo. 2014-05-08 01:57:21 +01:00
photonstorm
041bbd430c 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. 2014-05-07 01:30:48 +01:00
photonstorm
6070bc63bc Sound.play now returns the Sound object (thanks @AnderbergE, fix #802) 2014-05-07 00:12:41 +01:00
photonstorm
91f8f96a76 TilemapWalker allows you to set a location marker into a tilemap. You can then move around with commands such as moveForward, turnLeft, etc.
New consts: Phaser.Tilemap.NORTH, SOUTH, EAST and WEST to use with the TileMapWalker Plugin.
2014-05-07 00:10:48 +01:00
photonstorm
2b40c8a7c7 Pointer.type and Pointer.exists properties added.
QuadTree.retrieve can now accept either a Sprite with a physics body or a Phaser.Rectangle as its parameter.
ArcadePhysics.getObjectsUnderPointer will return all children from a Group that overlap with the given Pointer.
2014-05-06 02:45:10 +01:00
photonstorm
ad7e2aff1f 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. 2014-05-02 12:21:57 +01:00
photonstorm
842abb82d3 Pointer.pointerId added which is set by the DOM event (if present in the browser). Note that browsers can and do recycle pointer IDs. 2014-05-02 12:14:05 +01:00
photonstorm
f38ccf9afe Phaser.Tween.from allows you to set tween properties that will end up where the current object is (thanks @codevinsky, #792) 2014-05-01 23:51:21 +01:00
photonstorm
4466b3cd5d Input.getPointerFromIdentifier docs update to reflect where the identifier comes from. Pointer properties now set to give it fixed defaults (thanks @JirkaDellOro, #793) 2014-05-01 23:35:40 +01:00
photonstorm
3f51721131 Readme updates. 2014-05-01 11:45:40 +01:00
photonstorm
a01b8f2387 Doc updates. 2014-05-01 02:42:06 +01:00
photonstorm
a7fe3a5346 Line.pointOnLine corrected algorithm (thanks @woutercommandeur, fix #784) 2014-04-30 11:57:52 +01:00
photonstorm
046707bc92 Merge branch 'origin/master' 2014-04-29 22:58:44 +01:00
photonstorm
dad90a6bdd readme update. 2014-04-29 22:36:46 +01:00
photonstorm
55dc748953 Tilemap.getTile and getTileXY used to return null in 2.0.3 but returned a Tile object in 2.0.4 (with an index of -1), they now return null again. 2014-04-29 21:28:14 +01:00
photonstorm
fa613c5fe1 ScaleManager seeds _check private var with null to avoid later comparison check (thanks @jflowers45, fix #782)
P2.Body.applyForce should have used pxmi instead of pxm (thanks @Trufi, fix #776)
P2 fixed creation of RevoluteConstraint by passing maxForce in the options (thanks @woutercommandeur, fix #783)
2014-04-29 19:34:38 +01:00
photonstorm
eb86f612b3 Prep for 2.0.5 development. 2014-04-29 16:25:10 +01:00