photonstorm
15e6edc56b
BitmapData.copy no longer creates any temporary variables. It also accurately copies over Sprite/Image values before drawing them.
...
Creation now defaults to a texture size of 256x256.
2014-09-03 12:53:07 +01:00
photonstorm
1f84024a3e
Cache.getImage now returns null if no image was found.
2014-09-03 11:11:48 +01:00
photonstorm
8bc5ba8d7d
Tween.generateData would skip the end values in the data array. They are now included as the object in the final array element.
2014-09-02 15:45:52 +01:00
photonstorm
865c6878bf
P2.World.getSprings used to return an empty array, but now returns all the Springs in the world ( #1134 )
2014-09-02 15:06:43 +01:00
photonstorm
d26f937f1c
RetroFont has a new property called frameData which contains the Frame objects for each of the letters in the font, which can be used by Sprites.
2014-09-02 00:41:53 +01:00
Richard Davey
152335ff46
docs update.
2014-09-01 21:33:29 +01:00
Carlos Martinez
a869939bc3
Merge branch 'master' of https://github.com/photonstorm/phaser into dev
2014-09-01 14:20:15 +01:00
photonstorm
070e33f1e7
ArcadePhysics.overlap has been updated so that the Body.overlapX/Y properties are set to the amount the two bodies overlapped by. Previously they were zero and only populated during the separation phase, but now the data is available for just overlap checks as well. You can then use these values in your ovrelap callback as required - note that they are changed for every check, so a Sprite overlap tested against 10 other sprites will have the overlapX/Y values updated 10 times in a single collision pass, so you can only safely use the values in the callback ( #641 )
2014-09-01 03:54:55 +01:00
photonstorm
7fc37751b2
ScaleManager.orientationSprite has been removed because it never displayed correctly anyway (it would be distorted by the game scale), it will be bought back in a future version by way of a custom orientation state.
2014-09-01 03:30:02 +01:00
photonstorm
8fec5169f0
Added Sound._muteVolume which stops Firefox and IE9 crashing if you try to unmute a sound that hasn't yet been muted, which can also happen as a result of a game visibility change (thanks @osmanzeki #1108 #1123 )
2014-09-01 03:13:05 +01:00
photonstorm
80d1df4705
ScaleManager.setMinMax(minWidth, minHeight, maxWidth, maxHeight) is a handy function to allow you to set all the min/max dimensions in one call.
2014-09-01 03:07:17 +01:00
photonstorm
fe9dbd15e5
The World bounds can now be set to any size, including smaller than the game dimensions. Before it was locked to a minimum size of the game canvas, but it can now be anything.
2014-09-01 02:41:07 +01:00
photonstorm
1a60d641b1
Canvas.removeFromDOM(canvas) will remove a canvas element from the DOM.
...
Game.destroy now removes the games canvas element from the DOM.
2014-09-01 02:38:21 +01:00
photonstorm
97d771c4e8
ScaleManager has a new scaleMode called RESIZE
which will tell Phaser to track the size of the parent container (either a dom element or the browser window if none given) and set the canvas size to match it. If the parent changes size the canvas will resize as well, keeping a 1:1 pixel ratio. There is also a new ScaleManager.setResizeCallback method which will let you define your own function to handle resize events from the game, such as re-positioning sprites for a fluid responsive layout ( #642 )
...
The width and height given to the Phaser.Game constructor can now be numbers or strings in which case the value is treated as a percentage. For example a value of "100%" for the width and height will tell Phaser to size the game to match the parent container dimensions exactly (or the browser window if no parent is given). Equally a size of "50%" would tell it to be half the size of the parent. The values are retained even through resize events, allowing it to maintain a percentage size based on the parent even as it updates.
2014-09-01 01:52:04 +01:00
photonstorm
5fb8c7eb85
ScaleManager window.resize handler would constantly dispatch enterPortrait and enterLandscape events on window resizing, regardless if it actually entered that orientation or not.
...
Stage.offset has been moved to ScaleManager.offset
Stage.bounds has been removed, you can access it via Stage.getBounds.
Stage.checkOffsetInterval has been moved to ScaleManager.trackParentInterval
ScaleManager.hasResized signal has been removed. Use ScaleManager.setResizeCallback instead.
2014-09-01 01:02:48 +01:00
photonstorm
e3f11d5aba
change log update.
2014-08-31 00:21:47 +01:00
photonstorm
92386221e4
Tile.setCollision now adjusts the tiles interesting faces list as well, this allows you to create one-way jump tiles without using custom callbacks on a specific tile basis (thanks @RafaelOliveira #886 )
2014-08-29 18:03:32 +01:00
photonstorm
5546e5903c
Tiled polylines are now imported into the map objects property as well as map collision ( #1117 )
2014-08-29 16:56:30 +01:00
photonstorm
0284d0b98c
If Time.elapsed was > Time.timeCap it would reset the elapsed value to be 1 / 60. It's now set to Time.timeCap and Time.timeCap defaults to 1 / 60 * 1000
as it's a ms value (thanks @casensiom #899 )
2014-08-29 16:37:57 +01:00
photonstorm
10e7d8ff7e
TilemapParser.getEmptyData now correct adds an empty bodies array into layers. This fixes an issue where p2 couldn't convert a csv map into collision tiles (thanks @sru #845 )
2014-08-29 16:30:29 +01:00
photonstorm
719b81c6e3
GamepadButton.justPressed and justReleased now correctly report if the button has just been pressed or released (thanks @padpadpad #1019 )
2014-08-29 16:08:38 +01:00
photonstorm
7b9c1a561e
GamePad and SinglePad onAxisCallback parameters have changed. You are now sent: this (a reference to the SinglePad that caused the callback), the axis index and the axis value in that order.
...
GamePad axis detection now works again properly in Firefox (#1035 )
2014-08-29 15:55:05 +01:00
photonstorm
32119e9892
Animation.onUpdate is a new event that is dispatched each time the animation frame changes. Due to its intensive nature it is disabled by default. Enable it with Animation.enableUpdate = true
( #902 )
2014-08-29 14:30:44 +01:00
photonstorm
9055fc7e01
The Pointer move callbacks are now sent an extra parameter: fromClick
allowing your callbacks to distinguish between the Pointer just moving, or moving as a result of being pressed down (thanks @iforce2d #1055 )
2014-08-29 14:19:47 +01:00
photonstorm
26a55bd202
SoundManager.destroy is a new method that will destroy all current sounds and reset any callbacks.
...
StateManager.clearCurrentState now handles the process of clearing down the current state and is now called if the Game is destroyed.
Game.destroy now clears the current state, activating its shutdown callback if it had one. It also now destroys the SoundManager, stopping any currently running sounds (#1092 )
2014-08-29 11:37:47 +01:00
photonstorm
69b9e5eb7c
Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo #877 #1147 )
2014-08-29 01:28:43 +01:00
photonstorm
52ea95d9ce
Sound.restart used to cause the Sound to double-up if it was already playing when called. Now correctly stops the sound before restarting it (thanks @wombatbuddy #1136 )
2014-08-29 01:06:29 +01:00
photonstorm
dd9e7e6297
Pointer.dirty is a new boolean that is set by the InputHandler. It tells the Pointer to re-check all interactive objects it may be over on the next update, regardless if it has moved position or not. This helps solve issues where you may have a Button that on click generates a pop-up window that now obscures the Button (thanks @jflowers45 #882 )
2014-08-29 00:47:49 +01:00
photonstorm
6fbaa36ddd
P2.PointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
...
P2.InversePointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
P2.PointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
P2.InversePointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
2014-08-28 17:04:58 +01:00
photonstorm
34426e7560
Loader.useXDomainRequest boolean automatically set to true
if the browser is specifically detected as IE9, but you can still override this. IE10 will use xhr.
2014-08-28 05:24:57 +01:00
photonstorm
9de1d494df
Phaser 2.1.0 build files for testing.
...
Ninja Physics is no longer included in the build files by default. Not enough people were using it, and not enough contributions were coming in to help polish it up, so we've saved the space and removed it. It's still available in the grunt build files if you require it, but we're deprecating it from the core library at this time. It will make a return in Phaser3 when we move to a modular class system.
2014-08-28 04:53:05 +01:00
photonstorm
4cdffb6b6f
Change log update.
2014-08-28 04:38:26 +01:00
photonstorm
2d4d1a050d
Tilemap.hasTile now checks the Tile.index value and will return false if the index is -1 (i.e. a non-active tile) (thanks @elgansayer #859 )
2014-08-28 04:30:13 +01:00
photonstorm
a7d9b2c8c5
The P2.World.postBroadphaseHandler now checks if the returned pairs array is empty or not before processing it (thanks @wayfu #934 )
2014-08-28 04:24:08 +01:00
photonstorm
0c88ba041a
If you used a single Game configuration object and didn't specify the enableDebug property it would crash on Debug.preUpdate (thanks @luizbills #1053 )
2014-08-28 04:19:10 +01:00
photonstorm
83619ba81e
InputHandler docs updated to avoid Pointer data-type confusion ( #1097 )
2014-08-28 04:07:24 +01:00
photonstorm
6216cf578c
BitmapFonts are now correctly added to the Cache._bitmapFont array and returned via Cache.getBitmapFont (thanks @prudolfs #1076 )
2014-08-28 03:52:26 +01:00
photonstorm
0f207c47a7
Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077 )
2014-08-28 03:44:02 +01:00
photonstorm
ec687868de
Input.setMoveCallback has been removed due to deprecation.
...
BitmapData.refreshBuffer has been removed and replaced with BitmapData.update.
BitmapData.drawSprite has been removed due to deprecation. Use BitmapData.draw instead.
Pointer.moveCallback has been removed due to deprecation.
SinglePad.addButton has been removed due to deprecation.
P2.Body.loadData has been removed due to deprecation.
P2.World.defaultFriction and defaultRestitution have been removed due to deprecation.
Canvas.create noCocoon parameter has been removed due to deprecation.
Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
2014-08-28 03:40:59 +01:00
photonstorm
6e2cd37776
ScaleManager.destroy now removes the window and document event listeners, which are no longer created anonymously (thanks @eguneys #1092 )
...
Input.Gamepad.destroy now destroys all connected SinglePads and clears event listeners.
SinglePad.destroy now clears all associated GamepadButton objects and signals.
2014-08-28 03:31:47 +01:00
photonstorm
fa45d7feff
Events.onDestroy is a new signal that is dispatched whenever the parent is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
...
Group.onDestroy is a new signal that is dispatched whenever the Group is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
2014-08-28 02:56:06 +01:00
photonstorm
6b4510f693
TileSprite now has the alive
property, which should help with some Group operations (thanks @jonkelling #1085 )
2014-08-28 02:36:30 +01:00
photonstorm
42c810b43f
Fixed the resolution uniform type in the SampleFilter (thanks @VictoryRice #1137 )
2014-08-28 02:20:49 +01:00
photonstorm
d7f8950758
Debug.cameraInfo no longer crashes if the camera bounds are nulled (thanks @wayfu #1143 )
...
Camera.setBoundsToWorld no longer crashes if the camera bounds are nulled (thanks @wayfu #1143 )
2014-08-28 02:13:51 +01:00
photonstorm
01db9257e0
Change log updates.
2014-08-28 02:06:48 +01:00
photonstorm
31f450dd42
Docs updates, preparing for Rope merge.
2014-08-28 01:59:10 +01:00
photonstorm
c76aa785f9
Documentation updates.
2014-08-28 01:57:38 +01:00
photonstorm
7772590b18
Docs update.
2014-08-28 01:44:48 +01:00
photonstorm
ccc8369f43
InputHandler.checkBoundsRect was incorrectly assigning a property in Sprites fixed to the camera being dragged left (thanks @CraigBeswetherick #1093 )
2014-08-28 01:29:23 +01:00
photonstorm
7bfa6fa9f2
Loader.useXDomainRequest boolean added. If true
(the default is false
) it will use XDomainRequest when loading JSON files instead of xhr. In rare IE edge-cases this may be required. You'll know if you need it ( #1131 #1116 )
2014-08-28 01:23:45 +01:00