Richard Davey
fbd1ba05f7
Phaser.Utils.reverseString will take the given string, reverse it, and then return it.
2016-06-27 22:43:53 +01:00
Richard Davey
a0c771d47e
Text.setText has a new optional argument immediate
which will re-create the texture immediately upon call, rather than wait for the next render pass to do so (thanks @Scraft #2594 )
2016-06-27 22:42:01 +01:00
photonstorm
b24de1e561
Polygon.contains would only work with non-flattened Polygon objects. It now works with both flat and non-flat Polygons.
...
Graphics objects enabled for input would fail to do anything if a Phaser Polygon was given to the Graphics object (which it was in nearly all cases), as it wouldn't detect input correctly with flattened polygons (thanks @symbiane #2591 )
2016-06-27 14:51:25 +01:00
Richard Davey
5e38f83627
Docs update.
2016-06-21 22:21:40 +01:00
Richard Davey
2bd4f68ea0
Small tweaks to #2577 and TS defs.
2016-06-21 22:18:09 +01:00
Richard Davey
50434375a1
Tidy up formatting for #2585
2016-06-21 22:00:59 +01:00
photonstorm
e39cd584bf
The start of the PIXI re-documentation process. Time to remove the old YUIdoc syntax, and replace with JSDoc and more meaningful descriptions.
2016-06-20 15:50:51 +01:00
photonstorm
d119ffa539
Removed PIXI.DisplayObject.prototype._renderWebGL
and PIXI.DisplayObject.prototype._renderCanvas
as both were only there for ancient jshint tests.
2016-06-20 14:10:21 +01:00
photonstorm
2310e5dc6f
Sound.volume was accidentally repeated twice in the source (thanks @LoneStranger #2569 )
2016-06-20 12:18:39 +01:00
photonstorm
697a2ae94e
Fixed issue in Group.align where the cell wouldn't increase if rows
was great than -1
2016-06-17 15:28:39 +01:00
Richard Davey
effb975a25
Preparing for 2.5.1 development.
2016-06-17 13:11:48 +01:00
photonstorm
be0f50b23e
Preparing for 2.4.10 development.
2016-06-17 03:05:14 +01:00
photonstorm
47f0224a40
Phaser 2.4.9 release.
2016-06-17 01:11:24 +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
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
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
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
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
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
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
photonstorm
0880380ea9
Phaser 2.4.9 RC4.
2016-06-10 16:22:54 +01:00
Richard Davey
cd8bb5a216
Removed keyCode modifier ( #2542 )
2016-06-09 22:03:09 +01:00
photonstorm
88f47e2497
Keyboard now uses a new internal method getKeyCode
to normalize the key code value based on browser support. It first checks for event.key
, then event.keyIdentifier
and finally event.keyCode
(thanks @SVasilev #2542 )
2016-06-09 16:37:32 +01:00
photonstorm
a65f9c7e4b
Group.onChildInputDown is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an onInputDown
signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.
...
Group.onChildInputUp is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an `onInputUp` signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.
Group.onChildInputOver is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an `onInputOver` signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.
Group.onChildInputOut is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an `onInputOut` signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.
2016-06-09 16:19:11 +01:00
photonstorm
99aeae5e4d
Docs update.
2016-06-09 14:58:41 +01:00
photonstorm
e8e7e27184
The DisplayObject.renderOrderID
used to run in reverse. I.e. in a display list with 10 sprites on it, the first sprite (at the bottom of the list, rendering behind all the others) would have a renderOrderID
of 9, where-as the top-most sprite, rendering above all others, would have a renderOrderID
of 0. While this didn't cause any side-effects internally, it's arguably illogical. So the process has been reversed, and renderOrderID
s are now accumulative, starting at zero each frame, and increasing as it iterates down the display list. So the higher the ID, the more "on-top" of the output the object is.
...
`InputHandler.validForInput` and `Pointer.processInteractiveObjects` have been updated to reflect the new `renderOrderID` sequence (see above).
2016-06-09 12:32:37 +01:00
photonstorm
e5c4f7729d
Docs update.
2016-06-09 11:37:01 +01:00
Richard Davey
1956d3584e
InputHandler.dragStopBlocksInputUp is a boolean that allows you to control what happens with the input events. If false
(the default) then both the onInputUp
and onDragStop
events will get dispatched when a Sprite stops being dragged. If true
then only the onDragStop
event is dispatched, and the onInputUp
is skipped.
2016-06-07 02:21:12 +01:00
Richard Davey
df92c45420
There are two new Phaser consts available, for help with orientation of games or Game Objects. They are Phaser.HORIZONTAL
, Phaser.VERTICAL
, Phaser.LANDSCAPE
and Phaser.PORTRAIT
.
2016-06-07 01:45:33 +01:00
Richard Davey
66b846cbdb
InputHandler.dragDistanceThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a distance, in pixels, that the pointer must have moved before the drag will begin.
...
InputHandler.dragTimeThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a time, in ms that the pointer must have been held down for, before the drag will begin.
InputHandler.downPoint is a new Point object that contains the coordinates of the Pointer when it was first pressed down on the Sprite.
2016-06-07 01:28:06 +01:00
photonstorm
5492ed0d64
Docs update.
2016-06-06 11:15:38 +01:00
Richard Davey
de3d749385
Farthest swapped for the more common Furthest.
2016-06-05 23:01:00 +01:00
Richard Davey
56759f46fd
Docs update.
2016-06-05 21:23:13 +01:00
photonstorm
61f064dfe9
Docs update.
2016-06-03 16:45:47 +01:00
photonstorm
93b1f3eba1
Math.between will return a value between the given min
and max
values.
2016-06-03 16:18:35 +01:00
photonstorm
ee6f277b31
PluginManager.remove has a new argument destroy
(defaults to true
) which will let you optionally called the destroy
method of the Plugin being removed.
2016-06-03 15:52:17 +01:00
photonstorm
0da7cf5ffd
There are a bunch of new Phaser consts available to help with setting the angle of a Game Object. They are Phaser.ANGLE_UP
, ANGLE_DOWN
, ANGLE_LEFT
, ANGLE_RIGHT
, ANGLE_NORTH_EAST
, ANGLE_NORTH_WEST
, ANGLE_SOUTH_EAST
and ANGLE_SOUTH_WEST
.
2016-06-03 15:19:18 +01:00