Commit graph

745 commits

Author SHA1 Message Date
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
photonstorm
c87aa5103d Fixed the RevoluteConstraint worldPivot and moved it to the end of the signature to minimise code changes. 2014-08-28 01:14:59 +01:00
photonstorm
aeb82dbee9 World.createRotationalSpring will now let you create rotational springs. 2014-08-28 00:58:50 +01:00
photonstorm
6acc8bf9f2 World.enableBodySleeping has been removed and replaced with World.sleepMode. 2014-08-28 00:45:57 +01:00
photonstorm
98ccae56de P2.Body now uses the new Body.type value instead of Body.motionState, however as P2.Body already have a property called type we have left the motionState getter/setter in for now. 2014-08-28 00:39:47 +01:00
photonstorm
4935a4e4af RevoluteConstraint fixed for new version of p2. 2014-08-28 00:24:56 +01:00
photonstorm
b25bdf3523 Fixed the DistanceConstraint parameters. 2014-08-28 00:15:28 +01:00
photonstorm
33c52eaf09 BitmapData alpha option added.
Pointer return type added.
pixi manifest updated to remove need for geom classes.
2014-08-27 21:26:29 +01:00
photonstorm
f887ee0df8 TypeScript definition updates to help fix for the noimplicitany option (thanks @Waog #1088) 2014-08-06 16:24:33 +01:00
Alvin
31c1423947 Merge pull request #1057 from steelywing/patch-2
add README.md index
2014-08-06 15:39:14 +02:00
photonstorm
36ecd81f29 Arcade Physics Body.skipQuadTree is a new boolean that if set to true when you collide the Sprite against a Group it will tell Phaser to skip using a QuadTree for that collision. This is handy if this Body is especially large.
Arcade Physics World.skipQuadTree will disable the use of all QuadTrees in collision methods, which can help performance in tightly packed scenes.
2014-08-04 13:04:11 +01:00
photonstorm
06cb37247a Updated readme. 2014-08-04 12:24:34 +01:00