photonstorm
22f7aacfcb
Added frameBased to the TweenManager and made Tween.frameBased reference that setting, allowing you to set it once ( #2015 )
2015-08-20 12:59:06 +01:00
photonstorm
99fbf35236
* Pointer.withinGame is no longer automatically set to 'false' in the Pointer.stop method - it will check if the Pointer actually is within the stage bounds and only set withinGame
to false if it's outside the bounds.
...
* MSPointer now has an `onPointerUpGlobal` handler for when the pointer is released outside of the canvas, but still within the browser window. This means that in IE11 a Sprites `onInputUp` event will now trigger even when outside the canvas (thanks @bvargish #2000 )
* MSPointer now has handles for the pointer being over and outside of the canvas element, which sets the Pointer.withinGame booleans accordingly. It also triggers the Mouse.mouseOutCallback and Mouse.mouseOverCallback callbacks respectively.
* The MSPointer event listeners have been renamed to all lower-case, i.e. 'pointerDown' is now 'pointerdown'.
2015-08-20 12:47:50 +01:00
photonstorm
55a7699381
Setting a P2.Body from Static or Kinematic to Dynamic will now automatically adjust the Body.mass to be 1 (thanks @wayfu #2005 )
2015-08-20 11:19:30 +01:00
Richard Davey
994a7dae73
jsdoc fix #2013
2015-08-19 22:19:55 +01:00
photonstorm
103c37cd42
BitmapData.drawFull draws the given Game Object or Group to a BitmapData and then recursively iterates through all of its children, including children of Game Objects and Groups. It can draw Text, BitmapText, Sprites, Images, Emitters and Graphics objects. It's perfectly valid to pass in game.world
as the parent object, and it will iterate through the entire display list.
2015-08-19 14:19:26 +01:00
photonstorm
176289f514
Video.stop now removes the 'playing' event listener, which stop Videos set to loop from throwing errors after being destroyed.
2015-08-18 16:04:10 +01:00
photonstorm
b1a05a6f52
BitmapText.font failed to pull the new font from the Phaser Cache, stopping it from updating properly (thanks @AbrahamAlcaina #2001 )
2015-08-18 13:48:08 +01:00
photonstorm
ac77bb8e46
Fixed download links.
2015-08-18 12:40:24 +01:00
Richard Davey
19584b78a3
Readme update.
2015-08-07 02:56:44 +01:00
Richard Davey
7fbeb1c062
BitmapData.line draws a line to the BitmapData in the color and thickness specified.
...
Lots of BitmapData updates to use local vars and 'op' property, cutting down code size.
2015-08-07 02:48:00 +01:00
Richard Davey
7588e123c7
Line.centerOn will position the Line so that its midpoint lays on the coordinates given.
2015-08-07 01:40:37 +01:00
Richard Davey
614b84e2ea
* Line.rotateAround allows you to rotate a Line around the given coordinates (in world space)
...
* Point.rotate uses a faster and simpler rotation function when no distance argument is specified.
* Line.rotate used a calculation method which resulted in the line growing (or shrinking) in length over time, the more it was rotated. The new method never changes the lines length.
2015-08-07 01:35:31 +01:00
Richard Davey
13e97532b8
Docs update.
2015-08-06 23:36:50 +01:00
photonstorm
8e7b717a50
Line.midPoint will return a Point object where the x and y values correspond to the center (or midpoint) of the Line segment.
2015-08-06 17:10:39 +01:00
photonstorm
9a0b6c24a4
Text can now accept undefined
or null
as the text
argument in the constructor and will cast it as an empty string.
2015-08-06 10:28:49 +01:00
Richard Davey
7fc23c9abe
Text.setTextBounds didn't add the x and y values to the width and height offsets.
2015-08-04 23:06:07 +01:00
photonstorm
1fed360659
VideoStream.active = false is used if the browser supports it, otherwise it falls back to VideoStream.stop.
2015-08-04 15:48:43 +01:00
photonstorm
f4a1f11429
PIXI.CanvasPool is a new static global created to deal with the issue of resource leaks and continuous DOM node build-up when creating lots of Text or BitmapData objects, or when calling generateTexture
on any display object. The CanvasPool will do its best to re-use out dated canvas elements rather than filling up the DOM with new ones.
...
Sprite.setTexture has a new `destroyBase` parameter - set this to `true` if you know the base used a generated texture that isn't being used by any other sprites. This will free-up the canvas for further re-use by other calls to generateTexture or Text objects.
2015-08-03 16:09:16 +01:00
photonstorm
0493e19b8b
Group.cacheAsBitmap would be incorrectly offset in Canvas mode (thanks @mkristo #1925 )
2015-08-03 12:03:20 +01:00
photonstorm
4e857f19f6
BitmapText with tints applied wouldn't update properly in Canvas mode (thanks @Pajamaman #1969 )
2015-08-03 11:51:04 +01:00
photonstorm
1102299173
readme update
2015-08-03 11:44:25 +01:00
photonstorm
98ae410c34
Removed use of the deprecated enterFullScreen
and leaveFullScreen
signals from the Scale Manager (thanks @mmanlod #1972 )
2015-08-03 11:44:00 +01:00
Richard Davey
9362a2b1f4
Text with tints applied wouldn't update properly in Canvas mode.
2015-07-31 19:09:49 +01:00
photonstorm
78fdb224ce
ArrayUtils.numberArrayStep would return an empty array if a single parameter was given, instead of a single step array (thanks @pooya72 #1958 )
2015-07-31 16:21:10 +01:00
photonstorm
f52155bce8
Readme update.
2015-07-31 16:02:25 +01:00
photonstorm
d23e5d6eba
BitmapText.smoothed is a new boolean property that allows you to set texture smoothing on a bitmap font or not. By default smoothing is always on, but you can turn it off which helps for bitmap fonts created from pixel art style character sets.
2015-07-31 15:58:00 +01:00
photonstorm
159f49d5bf
Experimenting with generateTexture fixes for Canvas.
2015-07-30 17:17:31 +01:00
photonstorm
fc83dc6bdf
Tween.frameBased allows you to control if a Tween updates based on the physics step (i.e. frame based) or the system clock (time based). A frame based tween will use the physics elapsed timer when updating. This means it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should be given in frames. If the Tween uses a time based update (which is the default) then the duration is given in milliseconds. In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween has actually been through.
2015-07-30 15:27:51 +01:00
photonstorm
c032d57183
Loader.images is a new method that allows you to pass an array of image keys, and optionally the urls, to the Loader and have them all added to the load queue in one go.
2015-07-30 15:01:52 +01:00
photonstorm
1393c8a98b
InputHandler.pointerOver would get stuck in an 'isOver' state if the Sprite changed its visibility during an onUp callback (thanks @Cristy94 #1955 )
2015-07-30 14:45:34 +01:00
photonstorm
a4321e56e3
* Pointer.isDown was reset before the Input.onUp event, meaning you couldn't get the Pointer.duration from within the event.
...
* Pointer.isDown was reset before the Input tap calculations, meaning onTap wouldn't dispatch (thanks @stovenator #1953 )
2015-07-30 14:08:26 +01:00
photonstorm
6139071ebc
Preparing for 2.4.3 dev.
2015-07-29 15:14:40 +01:00
photonstorm
4b22f48c75
2.4.2 release.
2015-07-29 15:01:04 +01:00
photonstorm
962066102c
Pointer fixes for Linux FireFox ( #1932 #1944 )
2015-07-28 14:18:36 +01:00
photonstorm
a8934c392d
Phaser.Sound will now automatically check the Cache to see if the audio file it is using is still there or not. If not then it will automatically called Sound.destroy
on itself. If you do not desire this result then you should ensure that you undertake all house-keeping yourself, and properly destroy Sound objects _before_ calling Cache.removeSound
( #1946 )
2015-07-27 14:02:04 +01:00
photonstorm
fd6c29e451
Pointer.move would accidentally reset the isDown
status of the Pointer on touch devices, which broke things like Sprite input events when built to native apps or run locally ( #1932 #1943 )
2015-07-27 13:34:06 +01:00
Richard Davey
1f73bbbe94
Device.canPlayVideo now checks for ogv
as a valid file extension for OGG video files (thanks @JB-Tellez #1928 )
2015-07-26 13:19:05 +01:00
Richard Davey
50480d815f
* Cache.getFrame has a new cache
parameter (that defaults to the Image cache, but can be changed to any other)
...
* Cache.getFrameCount has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.hasFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByIndex has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByName has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
re: #1935
2015-07-26 13:14:25 +01:00
Richard Davey
2e12cd70ed
DeviceButton would try to set altKey
, shiftKey
and ctrlKey
even for Joypads (thanks @zatch #1939 )
2015-07-26 13:01:24 +01:00
photonstorm
cef2948ec1
2.4.2 Readme update.
2015-07-24 17:53:17 +01:00
photonstorm
74a8ba0080
Preparing for 2.4.2 dev.
2015-07-24 14:04:30 +01:00
photonstorm
205fe5844d
2.4.1 readme.
2015-07-24 13:25:28 +01:00
photonstorm
444e2cffe5
More tests with the UMD wrapper.
2015-07-24 13:21:33 +01:00
Richard Davey
aeda044143
Safari on OSX wouldn't recognise button presses on trackpads (thanks JakeCake)
2015-07-23 20:54:59 +01:00
photonstorm
1113b8f683
README updated for 2.4.1 changes.
2015-07-23 16:01:16 +01:00
photonstorm
7967d32d52
Creature update.
2015-07-23 13:25:08 +01:00
photonstorm
4c97129916
Updating
2015-07-23 13:25:08 +01:00
Richard Davey
1e6f83dbd3
Preparing for 2.4.1 development.
2015-07-22 17:26:12 +01:00
photonstorm
858ad51610
Phaser 2.4 release.
2015-07-22 15:31:30 +01:00
photonstorm
8eb34f96ce
WebGL context loss and restoration is now handled directly by Phaser.
...
Cache.clearGLTextures empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.
2015-07-22 12:59:32 +01:00
photonstorm
915a757f96
Text.updateText will now check the width and height values of the Text canvas and if either are zero it sets Text.renderable = false
to avoid throwing WebGL texture binding errors.
2015-07-22 12:43:43 +01:00
photonstorm
f15fe6706c
All undefined argument checks were changed from if (typeof x === 'undefined')
to if (x === undefined)
removing the typeof check and saving some bytes across the codebase in the process.
2015-07-22 10:37:15 +01:00
Richard Davey
9e38bf974a
World.stateChange is a new method that is called whenever the state changes or restarts. It resets the world x/y coordinates back to zero and then resets the Camera.
...
Sprites with Arcade Physics bodies that had `collideWorldBounds` enabled would be moved to the wrong position if you restarted a State (or swapped to a new State) that reset the world bounds (thanks @vulvulune #1775 )
2015-07-22 01:24:26 +01:00
Richard Davey
356864ff8a
TweenData.update now uses the Time.elapsedMS
value for its delta calculation, instead of the physicsStep - this is because tweens are inherently time duration based and on a lagging system they were not properly completing when they should do (also addresses #1819 )
2015-07-22 00:09:06 +01:00
Richard Davey
b906463189
Internally the Time class has been updated to split out the RAF and SetTimeout implementations. This cuts down the update loop workload significantly, which was causing a performance optimization bottleneck in V8.
2015-07-21 21:41:26 +01:00
photonstorm
05914d3a95
Preparing readme for release.
2015-07-21 17:07:40 +01:00
photonstorm
ee59425be3
RC3
2015-07-21 15:19:26 +01:00
photonstorm
cf74eaa396
MSPointer now checks the pointerType
property of the DOM event and if it matches 'mouse' it will update Input.mousePointer
, rather than Input.pointer1
(or whatever the next free Pointer was).
2015-07-20 14:01:21 +01:00
photonstorm
7ffbeb8a2a
Added Mouse consts back in ( #1903 )
2015-07-20 12:38:41 +01:00
photonstorm
b470601faf
Tidying up docs.
2015-07-17 17:50:53 +01:00
photonstorm
a7f17394a4
Readme Update.
2015-07-16 16:40:12 +01:00
Richard Davey
9c588d94e8
PIXI.BitmapText has been removed as a global array, as it is no longer used.
2015-07-16 01:29:32 +01:00
Richard Davey
9314c5a767
LoaderParser.bitmapFont, xmlBitmapFont and jsonBitmapFont all now return the font data rather than write it to the now deprecated PIXI global font cache.
2015-07-16 01:17:03 +01:00
Richard Davey
3c7293ab57
Updated AnimationParser and fixed LoadTexture calls.
2015-07-16 01:02:59 +01:00
Richard Davey
bab50d7c88
* The Cache has been internally refactored considerably. Image data is now all stored in the same object, rather than being split across the PIXI global caches (such as PIXI.TextureCache and PIXI.BaseTextureCache), which are no longer used by Phaser.
...
* Internally the Cache now uses a single _cache object, which is partitioned to store the various different object types. Before the cache used lots of private objects, one per data type, but it's now a lot cleaner and we've managed to cut out hundreds of lines of duplicate code in the process.
* Cache.getImage has a new argument which lets you return either just the HTML Image element or the entire image cache object, which includes the baseTexture and frame data.
* Cache.getImage will return a __default image if the key isn't given, or a __missing image if the key is given but not found in the cache. This means it will always return a valid image and no longer cause Phaser to throw runtime errors deeper down with invalid image objects.
2015-07-16 00:46:28 +01:00
Richard Davey
c6f89737cb
The Cache has been internally refactored considerably. Images are now no longer grouped in a single Images cache, but split based on their type. For example you can now load an image called 'fire' and a texture atlas called 'fire' at they are placed into unique caches, where-as before you had to be careful not to use the same keys for anything using an image.
...
Internally the Cache now uses a single _cache object, which is partitioned to store the various different object types. Before the cache used lots of private objects, one per data type, but it's now a lot cleaner and we've managed to cut out hundreds of lines of duplicate code in the process.
2015-07-15 23:28:13 +01:00
photonstorm
a0d57544c7
P2 updates finished.
2015-07-13 14:48:33 +01:00
photonstorm
956fa493a6
The P2.Body.onBeginContact arguments have changed. It now sends 5 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A, the p2 Shape from Body B and the contact equations array. Note that the Phaser.P2.Body may be null if you collide with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.
...
The P2.Body.onEndContact arguments have changed. It now sends 4 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A and the p2 Shape from Body B. Note that the Phaser.P2.Body may be null if this is the end of a contact with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.
Upgraded to p2.js 0.7.0
2015-07-13 11:44:04 +01:00
Richard Davey
502dd548fb
Loader.path is a string and if set it is placed before any _relative_ file path given to the Loader. For example: load.path = "images/sprites/";
followed by load.image("ball", "ball.png");
and load.image("tree", "level1/oaktree.png");
would load the ball
file from images/sprites/ball.png
and the tree from images/sprites/level1/oaktree.png
. The path is added before the filename but *after* the Loader.baseURL
. The path _must_ end with a "/". Set it to nothing to disable the path.
2015-07-12 23:43:35 +01:00
Richard Davey
44c650f6e7
PIXI.DisplayObject.updateTransform now nulls the _currentBounds property (thanks @gaufqwi #1906 )
2015-07-12 12:01:38 +01:00
Richard Davey
b0a8d3d78c
Mouse.button and MSPointer.button properties removed and jsdocs expanded to explain the correct path to now take ( #1903 )
2015-07-12 11:47:20 +01:00
Richard Davey
4dec046c40
Added pendingDestroy to Groups.
2015-07-12 11:33:30 +01:00
photonstorm
6e84207331
Readme update.
2015-07-10 17:35:13 +01:00
photonstorm
d3525950a2
Group.addMultiple if given a Group.children array as the first parameter would fail as the original group length was decreased out of line with the children being added. Group.addMultiple now checks if the children argument is a Phaser.Group instance, and if so it uses Group.moveAll instead on it (thanks @AnderbergE #1898 )
...
Group.moveAll allows you to move all of the children of a Group into another Group.
2015-07-10 17:05:54 +01:00
Richard Davey
8e92c13412
Canvas.setSmoothingEnabled only applies the value of the property exists, which avoids the Chrome webkit prefix deprecation warnings.
2015-07-10 04:02:21 +01:00
Richard Davey
f65bca1026
All Signals now have the ability to carry extra custom arguments with them, which are passed on to the callback you define after any internal arguments. For example a Phaser.Key has an onDown signal. When dispatched onDown sends a reference to the Key as the first and only argument. But you can now set the callback like this: fireKey.onDown.add(shoot, this, 0, 'lazer', 64)
. So when the onDown signal is dispatched internally the callback (shoot
in this case) will receive 3 arguments: the Key reference that is raised internally and the string 'lazer' and value 64, which were the custom arguments provided when setting-up the callback.
2015-07-09 21:15:00 +01:00
photonstorm
918e00b868
Added Phaser.Keyboard.COMMA and Phaser.Keyboard.PERIOD to the consts list.
2015-07-09 14:31:18 +01:00
photonstorm
89c87bc9db
Updated addKeys to take an object instead of 2 arrays - it's just cleaner and reads easier in code.
2015-07-09 14:28:58 +01:00
photonstorm
5ad3698703
BitmapData.clear has 4 new optional parameters: x, y, width and height, that define the area to be cleared. If left undefined it works exactly the same as before and clears the entire canvas.
2015-07-09 11:44:21 +01:00
Richard Davey
d027bf8ba7
BitmapData.generateTexture will take a snapshot of the BitmapDatas canvas at that moment in time and convert it into an Image, which is then stored in the Phaser image Cache based on the key given. You can then use the new texture for any future sprites or texture based objects.
2015-07-09 00:19:07 +01:00
Richard Davey
3590272c51
All Game Objects have a new boolean property called pendingDestroy
. If you set this to true
then the object will automatically destroy itself in the *next* logic update, rather than immediately. This is useful for cases when you wish to destroy an object from within one of its own callbacks, such as with buttons or other input events (thanks @alamboley #1748 )
2015-07-08 18:52:01 +01:00
photonstorm
1b5da312d0
RandomDataGenerator.weightedPick has been tweaked slightly to allow for a more even distribution of weights. It still favors the earlier array elements, but will accurately include 'distance' elements as well (thanks @gingerbeardman #1751 )
2015-07-08 17:20:36 +01:00
photonstorm
64b1794d67
Rope.segments used the wrong vertices property, causing a runtime error.
...
Debug.ropeSegments didn't take the scale of the Rope object into consideration, causing incorrect debug rendering.
2015-07-08 16:40:26 +01:00
photonstorm
b9dcf74726
If the device is detected as a Windows Phone the renderer is automatically set to use Canvas, even if WebGL or AUTO was requested (thanks @ramarro123 #1706 )
2015-07-08 15:25:52 +01:00
photonstorm
0f31358724
Device.windowsPhone should now correctly identify Windows Phone 8.1 devices, which also think they are iOS and Androids. If you find a device that gets around this check please send us its ua string! (thanks @jounii #1496 )
2015-07-08 15:22:32 +01:00
photonstorm
1281bc52d7
Setting the scaleMode property of a Game configuration object would cause a ScaleManager TypeError in the resize method. It now stores the scale mode locally and applies it after boot (thanks @Mickawesomesque #1534 )
2015-07-08 14:52:20 +01:00
photonstorm
3012e49937
Text.addColor would incorrectly color the text stroke if set (thanks @llevkin #1893
...
Text.addStrokeColor works in the same way as `Text.addColor` but allows you to define a color stop for the stroke color instead of the fill color.
2015-07-08 12:52:39 +01:00
Richard Davey
86cac2085c
BitmapData.move(x, y) allows you to shift the contents of the BitmapData horizontally and vertically by the given amounts. The image wraps-around the edges of the BitmapData.
...
BitmapData.moveH(distance) allows you to horizontally shift the BitmapData with wrap-around the edges.
BitmapData.moveV(distance) allows you to vertically shift the BitmapData with wrap-around the edges.
2015-07-08 04:26:28 +01:00
Richard Davey
a7e18137d1
Text has a new style property: tabs. This allows you to specify a pixel value (or values) that allows you to space out text that contains tab characters within it. Text.tabs
can be either an integer, in which case all tabs share the same spacing, or an array of pixel values corresponding exactly to the number of tabs per line of text. This allows you to easily align columns of data in a single Text object.
2015-07-08 01:15:31 +01:00
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
photonstorm
bd44a25212
Readme updates.
2015-05-18 12:55:48 +01:00
photonstorm
5a149ea4ec
Docs updates.
2015-05-14 16:52:09 +01:00
photonstorm
f7514dc979
Docs updates.
2015-05-12 13:03:27 +01:00
photonstorm
7b938f396e
Rectangle.bottomLeft has been added (thanks @mattmogford #1788 )
2015-05-12 13:03:26 +01:00
photonstorm
4a4d7d594c
Docs updates.
2015-05-08 04:15:03 +01:00
photonstorm
25178fdf85
Docs update.
2015-05-08 01:51:18 +01:00
photonstorm
af66b49f31
If a BitmapData is created with a width or height set to zero then the width and/or height are set to a default value (256) instead to avoid getContext errors.
2015-05-06 16:50:10 +01:00
photonstorm
f623e68eb7
Docs updates.
2015-05-06 01:12:09 +01:00
photonstorm
9aa022ba8e
Docs update.
2015-05-05 17:03:44 +01:00
photonstorm
9ce76fcef8
Docs update.
2015-05-05 16:25:57 +01:00
photonstorm
33ece1fc52
Readme updates.
2015-05-05 14:02:10 +01:00