Richard Davey
43b4fd3caf
Fixed defs ( #2568 ) and added in Box2D defs.
2016-06-17 11:52:46 +01:00
photonstorm
0316a2c6aa
Merge remote-tracking branch 'origin/master' into dev
2016-06-17 03:10:36 +01:00
photonstorm
3ef05fd163
jshint fix.
2016-06-17 03:10:06 +01:00
photonstorm
be0f50b23e
Preparing for 2.4.10 development.
2016-06-17 03:05:14 +01:00
photonstorm
694debe94b
Rebuilt Phaser Comments TypeScript defs.
2016-06-17 02:28:57 +01:00
photonstorm
47f0224a40
Phaser 2.4.9 release.
2016-06-17 01:11:24 +01:00
photonstorm
9dd745167c
Docs fix.
2016-06-16 17:18:49 +01:00
photonstorm
4da3b15ae2
Renamed alignTo to alignIn, and added the new method alignTo, to allow for Sprite to Sprite alignment. Updated all of the Bounds and TS defs.
2016-06-16 17:01:51 +01:00
photonstorm
5bcf84f5a4
Added offsetX and offsetY arguments to Bounds.alignTo.
2016-06-16 15:51:12 +01:00
photonstorm
966a9f8b47
Docs update.
2016-06-16 14:31:26 +01:00
photonstorm
3d626d22db
Docs update.
2016-06-16 14:13:37 +01:00
photonstorm
06ac2cf921
Docs.
2016-06-16 13:25:46 +01:00
photonstorm
963678b65b
Docs update.
2016-06-16 12:40:04 +01:00
photonstorm
964e2db7da
Docs update.
2016-06-16 12:33:09 +01:00
photonstorm
04237f88bd
Readme update.
2016-06-16 12:27:36 +01:00
photonstorm
5ca134d328
Readme update.
2016-06-16 12:22:42 +01:00
photonstorm
f64558c4ac
Readme update.
2016-06-16 12:14:27 +01:00
Richard Davey
e659083818
Fixed jshint error.
2016-06-16 02:51:44 +01:00
Richard Davey
853d770764
Group.align is a new method that allows you to layout all the children of the Group in a grid formation. You can specify the dimensions of the grid, including the width, height and cell size. You can also control where children are positioned within each grid cell. The grid width and height values can also be set to -1, making them fluid, so the grid expands until all children are aligned. Finally an optional child index argument can be set. This is a great way to quickly and comprehensively align Group children, and has lots of use cases.
2016-06-16 02:50:24 +01:00
Richard Davey
fc7a3934d2
Group.align working.
2016-06-16 02:28:49 +01:00
Richard Davey
ed8fbd9a6c
All Game Objects with the Bounds component; which includes Sprites, Images, Text, BitmapText, TileSprites and anything that extend these, now have a new method alignTo
. It allows you to align the Game Object to another Game Object, or a Rectangle. You can specify one of 9 positions which are the new constants: Phaser.TOP_LEFT
, Phaser.TOP_CENTER
and so on (see above for the complete list). The Game Objects are positioned based on their Bounds, which takes rotation, scaling and anchor into consideration. You can easily place Sprites into the corners or the screen or game world, or align them against other Sprites, using this method.
2016-06-16 02:00:46 +01:00
Richard Davey
0efcf68b21
The Game Object Bounds component has been updated to include two new properties: centerX
and centerY
. This means you can, for example, now get the horizontal center of a Sprite by called Sprite.centerX
. These properties are also setters, so you can position the Game Objects, and it will take scale and anchor into consideration.
2016-06-16 01:00:11 +01:00
Richard Davey
123e61c018
The Game Object Bounds component has been updated so that it now provides setters for all of the properties, as well as getters. Previously Sprite.left
, Sprite.right
, Sprite.top
and Sprite.bottom
were read-only, but they are now available to be set as well, and take into consideration the anchor and scale of the Game Objects.
2016-06-16 00:33:48 +01:00
Richard Davey
c7225cb3b7
Added Rectangle.getPoint.
2016-06-15 23:40:15 +01:00
Richard Davey
d67e902760
Rectangle.getPoint is a new method that returns a point based on the given location constant, such as Phaser.BOTTOM_LEFT
. It returns the same result as calling Rectangle.bottomLeft
(etc) but unlike those getters you are able to provide your own Point object.
2016-06-15 23:39:15 +01:00
Richard Davey
64a44aab17
Added the following new constants: Phaser.TOP_LEFT
, Phaser.TOP_CENTER
, Phaser.TOP_RIGHT
, Phaser.MIDDLE_LEFT
, Phaser.MIDDLE_CENTER
, Phaser.MIDDLE_RIGHT
, Phaser.BOTTOM_LEFT
, Phaser.BOTTOM_CENTER
and Phaser.BOTTOM_RIGHT
.
2016-06-15 23:37:48 +01:00
Richard Davey
32cf1f1a9c
Group.createMultiple can now accept Arrays for both the key
and frame
arguments. This allows you to create multiple sprites using each key and/or frame in the arrays, which is a great and quick way to build diverse Groups. See the JSDocs for complete details and code examples.
2016-06-15 22:36:23 +01:00
gotenxds
91987eff56
Added some data to image object types.
2016-06-15 13:09:47 +03:00
Richard Davey
2aa2c67e7b
Merge pull request #2563 from aaronklaassen/reign-rein
...
Fix reign/rein in getting started guide
2016-06-15 10:52:20 +01:00
Richard Davey
70be74cb36
Lots of work on Body.moveTo and Body.moveFrom. Now working nicely.
2016-06-15 04:12:47 +01:00
Aaron Klaassen
aacb3436a4
Fix reign/rein typo.
2016-06-14 21:00:06 -05:00
Richard Davey
b5cc01132c
Body.move tests.
2016-06-14 23:45:00 +01:00
photonstorm
834a8df99d
Fixed concat grunt task so that the Weapon plugin is included.
2016-06-14 15:45:20 +01:00
photonstorm
bc00c900e9
BitmapData.smoothProperty is a new property that holds the string based prefix needed to set image scaling on the BitmapData context.
...
BitmapData.copyTransform allows you to draw a Game Object to the BitmapData, using its `worldTransform` property to control the location, scaling and rotation of the object. You can optionally provide
BitmapData.drawGroup now uses the new `copyTransform` method, to provide for far more accurate results. Previously nested Game Objects wouldn't render correctly, nor would Sprites added via `addChild` to another Sprite. BitmapText objects also rendered without rotation taken into account, and the Sprites smoothing property was ignored. All of these things are now covered by the new drawGroup method, which also handles full deep iteration down the display list.
2016-06-14 15:29:56 +01:00
photonstorm
189cbf4132
Added exists property.
2016-06-14 15:29:45 +01:00
photonstorm
6383f6b1fb
Updated docs.
2016-06-14 15:29:38 +01:00
photonstorm
7817d47a25
Updated Cache docs.
2016-06-14 12:18:32 +01:00
photonstorm
ad3641830d
Phaser.Matrix if passed a 0 value would consider it falsy, and replace it with the default by mistake. It now checks if the arguments are undefined
or null
and only then sets the defaults (thanks mmcs)
2016-06-14 12:18:23 +01:00
Richard Davey
7108bc3de3
Merge pull request #2552 from drhayes/dev
...
Distinguish between Arrays and Objects when cloning in Cache.getJSON.
2016-06-14 11:49:02 +01:00
Richard Davey
c484da3e16
Merge pull request #2561 from danzel/dev
...
Add Pointer.pointerMode
2016-06-14 11:45:27 +01:00
Dave Leaver
4dde32d746
Add Pointer.pointerMode
2016-06-14 18:02:11 +12:00
photonstorm
fb3f7721cb
Working through updating BitmapData.copy to use the source matrix instead, so it retains the correct draw sequence order.
2016-06-13 17:01:33 +01:00
photonstorm
1a3b06a9f4
The DisplayObject.worldRotation
value didn't sign the wt.c
value correctly, meaning the rotation would be wrong.
...
The `DisplayObject.worldScale` value didn't multiply the local objects scale into the calculation, meaning the value wasn't a true representation of the objects world scale.
2016-06-13 17:01:03 +01:00
Pete Baron
6848c90257
Added remaining task summary.
2016-06-14 01:20:43 +12:00
Pete Baron
04980c8096
Remove hack to force WEBGL mode for testing.
2016-06-14 01:02:02 +12:00
Pete Baron
11c5300591
Remove dubious use of tile.index to reference the tilesets list (it seems unlikely that there would ever be a tilesets value for every tile, and a huge waste of memory if it was ever done that way).
...
TODO: look into putting the tileset index (or a tileset reference) into each Tile structure when building them to avoid resolveTilesets entirely too.
2016-06-14 00:43:46 +12:00
Pete Baron
7533005a62
Fix buffer size bug.
2016-06-14 00:00:18 +12:00
Pete Baron
b406d10d94
Comments, and removed reinitialisation of the glBatch list.
2016-06-13 18:40:51 +12:00
Pete Baron
310b151924
Removed pixiTest flag, using renderType instead.
2016-06-13 18:39:52 +12:00
Pete Baron
a648026fa4
Progress update.
2016-06-13 18:39:16 +12:00