photonstorm
157df30696
Pointer button handling has been given an overhaul. It has the following new boolean properties: leftButton
, rightButton
, middleButton
, backButton
, forwardButton
and eraserButton
. So you can now easily check which buttons are active and build right or middle click support into your games. The Pointer object normalises these properties for you, regardless if they came from a MouseEvent or PointerEvent (thanks @youssefdetovernickr for the idea #1848 )
2015-07-07 16:53:56 +01:00
photonstorm
9548fb9856
Final textBounds updates.
2015-07-07 15:16:23 +01:00
Richard Davey
92f2742a26
When reusing a Tween created with an array of properties the values would get exponentially added to the TweenData internal array each time the tween was re-run (thanks @SBCGames #1747 )
2015-07-07 04:21:55 +01:00
Richard Davey
6a9fd4de8d
Debug.currentAlpha wasn't being used to set the alpha of the Debug context at all (was always set to 1) but now updates the alpha of the Debug context before anything is rendered to it (thanks @wayfu #1888 )
2015-07-07 03:32:11 +01:00
Richard Davey
06658fa1e0
TilemapLayer.resize allows you to resize a TilemapLayer. It will update the internal canvas object and corresponding texture dimensions ( #1881 )
2015-07-07 03:27:28 +01:00
Richard Davey
f57d3c19e9
P2.Body.createGroupCallback incorrectly referenced the _groupCallbackContext
when deleting it (thanks @Langerz82 #1886 )
2015-07-07 01:24:26 +01:00
photonstorm
ab092c5c14
Keyboard.addKeys is a practical way to create an object containing user selected hotkeys. For example: addKeys( [Phaser.Keyboard.W, Phaser.Keyboard.S, Phaser.Keyboard.A, Phaser.Keyboard.D], [ 'up', 'down', 'left', 'right' ] );
would return an object containing the properties up
, down
, left
and right
that you could poll just like a Phaser.Key object. (thanks @Mourtz #1857 )
2015-07-02 14:15:06 +01:00
photonstorm
698167a596
Tiled Image Collection support is now available and has been added to the TilemapParser and Tilemap classes (thanks @asyed94 #1879 )
2015-07-02 13:53:02 +01:00
photonstorm
a89d48b9a6
Text.autoRound allows you to control if the text is allowed to render at sub-pixel coordinates or not. Set to true
to round the coordinates, often eliminating anti-aliasing from certain font types ( #1867 )
2015-07-02 13:39:59 +01:00
photonstorm
ce405acb02
jsdoc update #1864
2015-07-02 13:31:26 +01:00
photonstorm
29f9eeabc6
RenderTexture now takes the display objects alpha into consideration when rendering it, before it would always reset worldAlpha to 1 before rendering, thus ignoring any alpha that may be set.
2015-07-02 13:28:44 +01:00
photonstorm
1ed33cb06c
Setting mute to false on Sound that was never muted caused its volume to be set to zero (thanks @brianbunch #1870 )
2015-06-24 15:54:25 +01:00
photonstorm
a69c156526
The Text Bounds is a rectangular region that allows you to align your text within it, regardless of the number of lines of text or position within the world. For example in an 800x600 sized game if you set the textBounds to be 0,0,800,600 and text alignment to 'left' and vertical alignment to 'bottom' then the text will render in the bottom-right hand corner of the game, regardless of the size of font you're using or the number of lines in the text itself.
...
Set the Style properties `boundsAlignH` and `boundsAlignV` or adjust them via the Text setters to change the alignment.
It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property.
Setting a textBounds _doesn't_ update the wordWrapWidth, so be aware of the relationship between the two.
Call this method with nothing defined for any of the parameters to reset an existing textBounds.
#1824
2015-06-17 17:18:04 +01:00
photonstorm
0258245f12
Phaser.Text no longer extends PIXI.Text but replaces it entirely. Phaser.Text now natively extends a Phaser Sprite, meaning it can be enabled for physics, damaged, etc.
2015-06-17 13:21:28 +01:00
photonstorm
102c74e121
Deprecated the following:
...
* Camera.screenView
* ScaleManager.maxIterations
* ScaleManager.enterPortrait (see onOrientationChange)
* ScaleManager.enterLandscape (see onOrientationChange)
* ScaleManager.enterFullScreen (see onFullScreenChange)
* ScaleManager.leaveFullScreen (see onFullScreenChange)
* ScaleManager.fullScreenFailed (see onFullScreenError)
* ScaleManager.checkResize
* ScaleManager.checkOrientation
* ScaleManager.setScreenSize (see updateLayout)
* ScaleManager.setSize (see reflowCanvas)
* ScaleManager.checkOrientationState (see reflowCanvas)
* ScaleManager.orientation (see screenOrientation)
* Gamepad.disabled (see enabled)
* Input.currentPointers (see totalActivePointers)
* Input.disabled (see enabled)
* Keyboard.disabled (see enabled)
* Mouse.disabled (see enabled)
* Mouse.mouseMoveCallback (see Input.addMoveCallback)
* MSPointer.disabled (see enabled)
* Touch.disabled (see enabled)
* Cache.getUrl (see getURL)
* Math.truncate (see Math.trunc)
* Math.snapToInArray (see Phaser.ArrayUtils.findClosest)
* Math.interpolateFloat (see Math.linear)
* Math.normalizeLatitude (use Phaser.Math.clamp(lat, -90, 90))
* Math.normalizeLongitude (use Phaser.Math.wrap(lng, -180, 180))
* Math.chanceRoll (use Phaser.Utils.chanceRoll)
* Math.numberArray (use Phaser.ArrayUtils.numberArray)
* Math.numberArrayStep (use Phaser.ArrayUtils.numberArrayStep)
* Math.limitValue (use Phaser.Math.clamp)
* Math.randomSign (use Phaser.Utils.randomChoice(-1, 1))
* Math.angleLimit (use Phaser.Math.clamp)
* Math.getRandom (use Phaser.ArrayUtils.getRandomItem)
* Math.removeRandom (use Phaser.ArrayUtils.removeRandomItem)
* Math.floor (use Math.trunc)
* Math.ceil (use Phaser.Math.roundAwayFromZero)
* Math.shift (use Phaser.ArrayUtils.rotate)
* Math.shuffleArray (use Phaser.ArrayUtils.shuffle)
* Math.distanceRounded (do the rounding locally)
* Canvas.getOffset (see Phaser.DOM.getOffset)
* Canvas.getAspectRatio (see Phaser.DOM.getAspectRatio)
* TilemapLayer.tileColor (use TilemapLayer.debugSettings.missingImageFill)
* Phaser.ArrayList alias removed, now use Phaser.ArraySet
* Utils.transposeArray (see Phaser.ArrayUtils.transposeMatrix)
* Utils.rotateArray (see Phaser.ArrayUtils.rotateMatrix)
* Utils.shuffle (see Phaser.ArrayUtils.shuffle)
2015-06-17 03:14:31 +01:00
photonstorm
8cf28fede7
maxHealth is a new property that Game Objects with the Health component receive and works in combination with the heal
method to ensure a health limit cap.
2015-06-17 02:00:04 +01:00
photonstorm
b725c25702
Button game objects now have Input.useHandCursor
set to true
by default.
2015-06-17 01:55:36 +01:00
photonstorm
e28eb7b390
Docs update.
2015-06-17 01:55:36 +01:00
photonstorm
40802314dd
TileSprite now fully supports animation again, having been broken for several versions due to a Pixi upgrade. We've updated the way TileSprites generate their textures internally considerably and animation support is back across both Canvas and WebGL as a result ( #1653 )
2015-06-17 01:25:56 +01:00
Richard Davey
14733e9b90
Tilemap.addTilesetImage can now accept a BitmapData as the key
parameter and will use the BitmapData to render the tileset with instead of an image from the cache (thanks to @unstoppablecarl for the idea #1838 )
2015-06-16 23:17:46 +01:00
photonstorm
30a35227da
Formatting update.
2015-06-16 20:38:18 +01:00
photonstorm
17831e0103
P2.Body.loadPolygon now allows the key
parameter to be passed as null
- when this happens the object
parameter can be the actual physics object data instead of a string pointing to the cache, allowing you to take advantage of adding multiple convex shapes with automatic adjustments for center of mass #1801
2015-06-16 19:02:28 +01:00
photonstorm
b481402ae4
Due to a Pixi 2 issue TileSprite when running under WebGL didn't respect the world alpha setting and would only work with its own alpha (thanks @hanenbro #1774 )
2015-06-16 17:03:19 +01:00
photonstorm
1990bce48b
Sound.restart and Sound.stop now properly disconnect the sound from the gainNode (or external node) before stopping it, allowing restart to work correctly (thanks @eofs #1796 )
2015-06-16 16:24:47 +01:00
photonstorm
00cf44eb22
If running under Cordova and iOS the Game.lockRender boolean will be set to true
when the game pauses and false
when it resumes. This avoids the gpus_ReturnNotPermittedKillClient
app crash on iOS (thanks @cncolder #1800 )
2015-06-16 14:54:42 +01:00
photonstorm
ab8c98676e
Sound.resume wouldn't properly restart looped sounds in Chrome after being paused. Phaser now specifically handles the Chrome 42 bug and later fix (thanks @nkovacs #1820 )
2015-06-16 14:28:46 +01:00
photonstorm
f5369628ce
Device.chromeVersion will return the major version number of Chrome.
2015-06-16 14:16:04 +01:00
photonstorm
732b80813e
Line.rotate allows you to rotate a line by the given amount around its center point.
2015-06-13 05:20:43 +01:00
photonstorm
9e78cd1d7a
Rectangle.random will return a uniformly distributed random point from anywhere within the rectangle.
2015-06-13 04:18:50 +01:00
photonstorm
77e7b2af9b
Ellipse.random will return a uniformly distributed random point from anywhere within the ellipse.
2015-06-13 03:46:20 +01:00
photonstorm
3daea179fb
Line.random will return a random point from anywhere on the Line segment.
2015-06-13 03:04:02 +01:00
photonstorm
9212c01dae
Returns a random point from anywhere within this circle.
2015-06-12 19:15:56 +01:00
photonstorm
af42f5d4c9
Cache.getJSON has a new parameter: clone
. If set it will return a clone of the object stored in the Cache rather than a reference to it.
2015-06-12 12:16:58 +01:00
photonstorm
681d8679e7
Rectangle.resize allows you to resize a Rectangle to the new given dimensions without altering its position.
2015-06-11 06:01:29 +01:00
photonstorm
2b0abb67dd
onDragUpdate is a new signal that is dispatched whenever a Game object enabled for input and drag is moved by a pointer (i.e. during a drag event). See the Phaser.InputHandler.enableDrag
docs for parameter details and the new Phaser Example.
2015-06-04 20:58:00 +01:00
photonstorm
eec99db8a9
Readme update.
2015-06-04 04:24:02 +01:00
photonstorm
ed82097151
Removed un-necessary PIXI.TextureCache pollution in Phaser.LoaderParser.bitmapFont.
2015-06-03 05:28:23 +01:00
photonstorm
76e2b00c82
Fixed pad jsdoc and ts defs ( #1823 )
2015-06-02 19:53:30 +01:00
photonstorm
cc5740af10
BitmapText line spacing and word wrapping has been vastly improved and bought in-line with how Pixi 3 handles it, but with additional anchor support.
2015-05-31 01:31:11 +01:00
Richard Davey
187d947c29
Merge pull request #1806 from joshtepei/patch-2
...
Fixed a comma error in README.md
2015-05-30 20:02:59 +01:00
photonstorm
1438248388
Group.add and Group.addAt will only create a Physics Body on the child if it doesn't already have one. This is a change from 2.3 where it would replace the physics body property with the new body, but this could lead to garbage build-up over time, so you should now properly destroy the body before changing it.
2015-05-29 00:59:23 +01:00
photonstorm
3ad60b815b
Docs update.
2015-05-27 18:07:38 +01:00
photonstorm
83b533557d
Docs update.
2015-05-26 20:01:57 +01:00
photonstorm
f2636a155a
Readme update.
2015-05-22 15:10:27 +01:00
photonstorm
312c31b778
jsdoc and formatting fixes.
2015-05-21 11:53:18 +01:00
Josh Tepei
6bf44a859c
Fixed a grammar error in README.md
...
Added a comma for further clarity on line 54 of README.md
2015-05-20 14:23:33 -07:00
photonstorm
5a91f85b1f
Typo.
2015-05-19 16:57:36 +01:00
photonstorm
ab594e930b
Readme update.
2015-05-19 16:09:19 +01:00
photonstorm
c3d123641b
Readme update.
2015-05-19 14:53:38 +01:00
photonstorm
0f6dd1a1a6
Device.firefoxVersion is a new property that contains the major Firefox version number if running within Firefox, otherwise zero.
2015-05-18 14:51:25 +01:00