Commit graph

1088 commits

Author SHA1 Message Date
photonstorm
5a0d5b4887 RetroFont now uses Phaser.scaleModes.NEAREST by default for its RenderTexture to preserve scaling. 2014-05-27 13:36:38 +01:00
photonstorm
cdde45a292 Phaser.RenderTexture incorrectly passed the scaleMode to Pixi.RenderTexture, causing the renderer to error. 2014-05-27 13:35:47 +01:00
photonstorm
8d94b4a91c Swapped keypress callback order. 2014-05-27 11:32:18 +01:00
photonstorm
9c35dfde0c ArcadePhysics.Body has a new boolean property enable. If false the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself. 2014-05-27 11:22:58 +01:00
photonstorm
5b9bd96583 RetroFont.updateOffset allows you to modify the offsetX/Y values used by the font during rendering. 2014-05-27 05:23:34 +01:00
photonstorm
890d90af4d Keyboard.addCallbacks now has a new parameter for keypress event capture.
Keyboard.pressEvent stores the most recent DOM keypress event.
Keyboard.processKeyDown now runs the callback after all the objects have been created and/or updated.
Keyboard.processKeyUp now runs the callback after all the objects have been created and/or updated.
Phaser.Keyboard.lastChar will return the string value of the last key pressed.
Phaser.Keyboard.lastKey will return the most recently pressed Key object.
2014-05-27 04:26:37 +01:00
photonstorm
68f1bbd9a5 RetroFont charsPerRow paramters is now optional. If not given it will take the image width and divide it by the characterWidth value. 2014-05-27 04:26:23 +01:00
photonstorm
f007a77f3d Fixed Gamepad issue that incorrectly checked non-webkit prefix gamepads. 2014-05-26 22:02:53 +01:00
photonstorm
cd963242cd jshint fix + draw sprite fix 2014-05-26 20:15:11 +01:00
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
be66a694a8 jsdoc and jshint fixes. 2014-05-24 02:53:48 +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
43e079a53a Readme update. 2014-05-20 10:31:55 +01:00
photonstorm
88306b6e12 P2 World array reset fix. 2014-05-20 10:03:00 +01:00
Richard Davey
00819626fc Merge pull request #835 from draklaw/tilemap-removeTile-fix
Tilemap removeTile sets tiles to null
2014-05-20 00:09:28 +01:00
photonstorm
a8256f4ef7 defs typo fix 2014-05-20 00:08:39 +01:00
Simon Boyé
7e43248412 Fixed Tilemap.removeTile issue to put tile of index -1 instead of null. 2014-05-19 22:58:52 +02: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
Richard Davey
ee30dd634a Merge pull request #831 from woutercommandeur/dev
Add movement data for pointerlocked mouse
2014-05-19 11:48: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
Wouter Commandeur
ce34da80c6 Only update movement when mouse is locked 2014-05-17 12:01:40 +02:00
Wouter Commandeur
e041eea968 whitespace adjustments 2014-05-17 11:32:11 +02:00
Wouter Commandeur
449c7ebfb0 Add mouse movement to pointer. This should be used with pointerLock. 2014-05-17 11:27:31 +02: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
3f3655a138 jshint fix 2014-05-15 15:38:28 +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
bdcc9fcbc4 Updated jsdocs re: Image/Sprite.crop (#820) 2014-05-14 02:18:18 +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
Richard Davey
5770b654a6 Merge pull request #791 from tigermonkey/dev
[tilemap] parse polygon, ellipses and rectangles
2014-05-14 00:06:53 +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
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
Richard Davey
e3f834314e Merge pull request #795 from codevinsky/graphics-drawTriangles
Graphics.drawTriangles and Polygon.area
2014-05-13 23:43:16 +01:00
Richard Davey
335ff53390 Merge pull request #819 from max-m/patch-1
Improve TileMap's setCollsion functions
2014-05-13 23:38:07 +01:00
Maximilian Mader
d7ba7b3a62 Improve TileMap's setCollsion functions
Now one can decide in 'setCollision', 'setCollisionBetween', 'setCollisionByExclusion' and 'setCollisionByIndex' to recalculate the collision faces or not.

I was able to decrease the time it takes to set the collisions from 1880ms to 440ms in my case,see http://www.html5gamedevs.com/topic/6328-camera-rendered-area-move-tilemaplayer/?p=38037
2014-05-12 17:42:54 +02:00
Georgios Kaleadis
d032d71938 happy semicolon, do not cry jshint 😭 2014-05-11 12:56:38 +02:00
Georgios Kaleadis
03849162a8 ensure that phaser never overrides an existing pixi class 2014-05-11 10:34:13 +02:00