Commit graph

885 commits

Author SHA1 Message Date
photonstorm
fc6b7dd36c StateManager.unlink will null all State-level Phaser properties, such as game, add, etc. Useful if you never need to return to the State again. 2014-09-15 13:19:01 +01:00
photonstorm
60acef2f97 If Game Objects change their frame, such as with an animated Sprite, and the change goes from a previously trimmed frame to a non-trimmed (full size) one, then the previous trim values were still left active, causing it to glitch (thanks stupot) 2014-09-11 20:56:01 +01:00
photonstorm
e5cac96302 Preparing for 2.1.2 2014-09-11 12:02:20 +01:00
photonstorm
5b922be56e Version 2.1.1. of Phaser is an emergency point release. It addresses a potential race condition that could happen in States that tried to change state from the create method but had an empty preloader or pre-cached assets. 2014-09-11 10:38:40 +01:00
photonstorm
a1a0861070 readme update + screen shot 2014-09-11 10:38:38 +01:00
photonstorm
b801630d78 Preparing for 2.1.1 development. 2014-09-09 16:50:23 +01:00
photonstorm
33d9b19e29 The Debug canvas is now cleared on State swap. 2014-09-09 15:28:58 +01:00
photonstorm
133ffd5fd1 2.1.0 docs updates. 2014-09-09 14:47:30 +01:00
photonstorm
1f089d74c5 Phaser.Easing.Default is a new property that is used when a specific type of ease isn't given. It defaults to Linear.None but can be overridden to anything (thanks @alvinsight) 2014-09-09 14:01:49 +01:00
photonstorm
c40c140631 Camera.roundPx is a new boolean. If set to true it will call view.floor as part of its update loop, keeping its boundary to integer values. Set to false to disable this from happening (#1141) 2014-09-09 12:47:27 +01:00
photonstorm
79d873f47b If you are using CocoonJS, please set your game render type to CANVAS and not WEBGL or AUTO. You should also disable any of the ScaleManager screen resizing or margin setting code. By default in this mode CocoonJS will now set 'screencanvas=true' which helps with performance significantly. 2014-09-08 22:34:53 +01:00
photonstorm
282db76351 Readme update. 2014-09-08 22:34:53 +01:00
photonstorm
df16970bcc Readme update. 2014-09-08 22:34:53 +01:00
photonstorm
59f7c53019 P2.Body.addCapsule didn't use to pass the radius value through pxm, but now does so you have to specify it in pixels, not meters. 2014-09-08 22:34:53 +01:00
photonstorm
4903e47a98 Rectangle.topRight returns a Point object that represents the top-right coordinate of the Rectangle. 2014-09-05 15:45:47 +01:00
photonstorm
0af4ec4da2 The StateManager will now check if a State has a method called resize. If it does, and if the game is running in the RESIZE Scale Mode then this method will be called whenever the game resizes. It will be passed two parameters: width and height that will match the games new dimensions. Resizing can happen as a result of either the parent container changing shape, or the browser window resizing. 2014-09-05 06:22:10 +01:00
photonstorm
f2a8a927f9 Group.addMultiple allows you to pass an array of game objects and they'll all be added to the Group in turn. 2014-09-05 06:01:25 +01:00
photonstorm
cb14fd1c01 Rectangle.centerOn(x,y) allows you to quickly center a Rectangle on the given coordinates. 2014-09-05 04:13:21 +01:00
photonstorm
d5ffe1f971 Phaser.Mouse will now add a listener to the window to detect mouseup events. This is used to detect if the player releases the mouse while outside of the game canvas. Previously Pointer objects incorrectly thought they were still pressed when you returned the mouse over the canvas (#1167) 2014-09-04 23:29:43 +01:00
Richard Davey
7ee1564f2e Signal.removeAll would ignore the context parameter and remove all bindings regardless (thanks @alect #1168) 2014-09-04 22:24:47 +01:00
Richard Davey
55400ce988 World.createDistanceConstraint signature changed to include new local anchors (thanks @rhmoller #1169) 2014-09-04 22:22:10 +01:00
photonstorm
9aaa8d80ca jsdocs, fixes to load, draw, copy and addToWorld. 2014-09-04 05:05:30 +01:00
photonstorm
7d9a4f4100 Phaser.Text wouldn't render the text to its local canvas if you passed the text on the constructor and didn't add it to the display list. If a string is given it now updates the local canvas on creation. 2014-09-04 02:18:12 +01:00
Richard Davey
0d486aa949 Updated the road map. 2014-09-03 23:01:24 +01:00
Richard Davey
168ce82fe8 Rectangle.bottom setter swapped the order of the calculation (thanks @JakeCoxon #1165) 2014-09-03 22:42:24 +01:00
Richard Davey
fe0c03d5d7 Phaser.Text.destroy will now destroy the base texture by default (#1162) 2014-09-03 22:34:10 +01:00
Richard Davey
42f19f4978 Phaser.Canvas.setImageRenderingCrisp now sets image-rendering: pixelated, perfect for pixel art and which is now supported in Chrome 38. 2014-09-03 22:16:03 +01:00
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
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
A.S. Lomoff
134068bada return back misstyping 2014-08-27 17:35:26 +03:00
A.S. Lomoff
61e58f4e9a fix TypeScript site URL 2014-08-27 17:34:31 +03: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
photonstorm
aabdf6f97a Resolves issue with pixel perfect click / over detection on Sprites that used trimmed image atlases for animations or frames > 0. 2014-08-01 17:46:51 +01:00
photonstorm
9bbc8ecce3 Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060) 2014-07-31 13:39:26 +01:00
Wing
eb4d635046 add README.md index 2014-07-22 14:13:32 +08:00
photonstorm
122640e01b Phaser.Loader was incorrectly getting the responseText from _xhr instead of _ajax on IE9 xDomainRequests (thanks @lardratboy #1050) 2014-07-21 11:12:58 +01:00
photonstorm
8e7e6f05e1 Adding .0 :) 2014-07-18 13:12:08 +01:00
photonstorm
113b69a5d1 Preparing for 2.1 development work. 2014-07-18 13:09:21 +01:00
photonstorm
ee49575714 Preparing for master. 2014-07-18 12:35:16 +01:00
photonstorm
24527eac3e Group.checkAll allows you to check if the same property exists across all children of the Group and is set to the given value (thanks @codevinsky #1013)
Group.checkProperty allows you to check if the property exists on the given child of the Group and is set to the value specified (thanks @codevinsky #1013)
Phaser.Utils.setProperty will set an Objects property regardless of depth (thanks @codevinsky #1013)
Phaser.Utils.setProperty will set an Objects property regardless of depth (thanks @codevinsky #1013)
Phaser.Utils.getProperty will get an Objects property regardless of depth (thanks @codevinsky #1013)
2014-07-18 11:52:39 +01:00
photonstorm
883c11e377 BitmapData.resize fixed to update the crop property too, resolves issues with images getting cut off with BitmapData.load. 2014-07-18 03:33:17 +01:00
photonstorm
49bb45c42e Tilemap.swap now accurately swaps from A to B and from B to A (thanks @noidexe #1034) 2014-07-18 00:29:24 +01:00
photonstorm
82ef6d4aeb If you add a Tween to the TweenManager and then immediately stop it, it will still exist in the TweenManager (thanks @gilangcp #1032) 2014-07-16 19:50:58 +01:00
photonstorm
90eec97707 Animation.updateFrameData allows you to load a new FrameData object into an existing animation, even if currently running (based on #1029)
AnimationManager.loadFrameData will now update all existing Animations to use the newly loaded FrameData (based on #1029)
2014-07-16 00:55:12 +01:00
photonstorm
aaf82f9d3a Sprite.loadTexture has a new optional stopAnimation boolean parameter which will halt the currently running animation (if any) after changing the texture (based on #1029). 2014-07-16 00:29:43 +01:00
photonstorm
d72e199291 Physics.bounds now correctly matches World.bounds on system start (thanks @Dumtard #1028) 2014-07-16 00:14:47 +01:00
photonstorm
afeeeecbe0 Keyboard.processKeyPress now checks if the Keyboard Input handler is disabled or not before processing the key callbacks. 2014-07-16 00:12:59 +01:00
photonstorm
d10dea27b0 Pixi updated worldTransform from an Array to an Object and Phaser Image, BitmapText, Text and Graphics were still using array access to populate the world property, giving it incorrect results (thanks @alvinsight) 2014-07-15 22:44:02 +01:00
photonstorm
538425193a World.wrap when using the bounds of the object wouldn't adjust the bounds correctly, meaning wrapping outside the camera failed (thanks @jackrugile #1020) 2014-07-15 14:22:24 +01:00
photonstorm
f78a527ad5 Prevented objects with pixel perfect checks from over-riding other higher priority ID items (#983)
Rebuilt the way items are polled for Pointer events (drag, click, move). Now faster and more efficient, especially when some items in the stack require pixel perfect checks.
2014-07-15 11:20:57 +01:00
photonstorm
2c421d27ce GameObjectFactory.spriteBatch now lets you specify null as a parameter for the parent and automatically adds the batch to game.world as a result. Also fixed jsdocs issues (@petarov #1000) 2014-07-14 12:56:05 +01:00
photonstorm
5bc482685b Renaming the release :) #1004 2014-07-14 12:08:46 +01:00
photonstorm
bc9e5804b2 Updated docs. 2014-07-11 18:02:47 +01:00
photonstorm
0353ee12be Reverting to a 2.0.7 release to fix the issues with Image / RetroText / Buttons. 2014-07-11 16:30:25 +01:00
photonstorm
74679922d1 Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, #995) 2014-07-11 11:52:48 +01:00
photonstorm
d7bed24a27 Preparing for 2.1.0 build. 2014-07-10 23:14:29 +01:00
photonstorm
8421cfc400 Final readme updates. 2014-07-10 20:39:17 +01:00
photonstorm
d0727b9c04 ReadMe update. 2014-07-10 20:39:13 +01:00
photonstorm
d11d8051b1 You can now prevent the Debug class from being created or booted by using the Game configuration setting: enableDebug. By default it is true, set to false to prevent the class from being created. Please note you are responsible for checking if this class exists before calling it, but you can do that via if (game.debug) { ... } (request #984) 2014-07-10 10:46:18 +01:00
photonstorm
a182598c65 Using a Game configuration object you can now specify the value of the preserveDrawingBuffer flag for the WebGL renderer. By default this is disabled for performance reasons. But if you need to be able to take screen shots of your WebGL games using toDataUrl on the game canvas then you'll need to set this to true (#987) 2014-07-10 10:46:18 +01:00
photonstorm
494c33a9f4 Rectangle.randomX will return a random value located within the horizontal bounds of the Rectangle.
Rectangle.randomY will return a random value located within the vertical bounds of the Rectangle.
2014-07-09 11:34:18 +01:00
photonstorm
003403c832 Color.getWebRGB will now accept either an Object or numeric color value. 2014-07-09 11:15:24 +01:00
photonstorm
ca8c6e16e9 README updates. 2014-07-08 12:59:36 +01:00
photonstorm
0b2bea3564 Removed hasOwnProperty check from Tween.from because it breaks on extended or inherited Game Objects. 2014-07-08 12:59:36 +01:00
photonstorm
2a106473b4 Added more detail to the Tween docs. 2014-07-08 12:59:36 +01:00
photonstorm
2d676b00b4 Working through crop issues. 2014-07-08 12:59:36 +01:00
photonstorm
77d5be1d8e When adding a new Animation to a Sprite it would incorrectly reset the current Sprite frame to the first frame of the animation sequence, it is now left un-touched until you call play on the animation. 2014-07-08 12:59:35 +01:00
photonstorm
14109aeeb1 Animation.next will advance to the next frame in the animation, even if it's not currently playing. You can optionally define the number of frames to advance, but the default is 1. This is also aliased from the AnimationManager, so you can do Sprite.animations.next().
Animation.previous will rewind to the previous frame in the animation, even if it's not currently playing. You can optionally define the number of frames to rewind, but the default is 1. This is also aliased from the AnimationManager, so you can do `Sprite.animations.previous()`.
2014-07-03 16:23:36 +01:00
photonstorm
7c624f409f Updated console.log and README. 2014-07-03 10:50:26 +01:00
photonstorm
177d51f238 Signal.removeAll now has a new context parameter. If specified only listeners matching the given context are removed (thanks @lucbloom for the idea, #880) 2014-07-03 02:22:11 +01:00
photonstorm
92dbabb2df Camera.updateTarget has had a make-over and now is a lot smoother under certain conditions (thanks @tjkopena, fix #966) 2014-07-03 02:09:53 +01:00
photonstorm
8c41f6cc10 Game.onBlur and Game.onFocus events are now dispatched regardless if Stage.disableVisibilityChange is true or false, so you can respond to these events without your game automatically pausing or resuming (#911) 2014-07-02 14:57:28 +01:00
photonstorm
2916f0413f Group.bringToTop (and consequently Sprite.bringToTop) no longer removes the child from the InputManager if enabled (thanks @BinaryMoon, fix #928)
Group.sendToBack (and consequently Sprite.sendToBack) no longer removes the child from the InputManager if enabled.
Group.add has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.addAt has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.remove has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onRemovedFromGroup` event.
Group.removeBetween has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Group.removeAll has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Internal child movements in Group (such as bringToTop) now uses the new `silent` parameter to avoid the child emitting incorrect Group addition and deletion events.
2014-07-02 14:04:14 +01:00
photonstorm
2cef655ed6 Calling Tween.stop from inside a Tween update callback would still cause the tween onComplete event to fire (thanks @eguneys, #924) 2014-07-02 05:47:38 +01:00
photonstorm
5ee9245acf Rectangle.right when set would set the new width to be Rectangle.x + the value given. However the value given should be a new Right coordinate, so the width calculation has been adjusted to compensate (thanks @cryptonomicon, #849) 2014-07-02 05:37:12 +01:00
photonstorm
58fc73348c The StateManager has a preRenderCallback option, which checks for a preRender function existing on the State, but it was never called. Have decided to add this in, so the core Game loop now calls state.preRender right before the renderer runs (thanks @AnderbergE #869) 2014-07-02 05:32:40 +01:00
photonstorm
757136bf4f Device.mobileSafari was no longer detecting Mobile Safari, now fixed (thanks @Zammy, #927) 2014-07-01 19:19:49 +01:00
photonstorm
79bd7c400b Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, #932) 2014-07-01 16:57:55 +01:00
photonstorm
faa9af5539 readme updates 2014-07-01 16:19:20 +01:00
photonstorm
d2fc42520b stopFullScreen has been changed to run against document instead of the canvas since the cancelFullScreen method is created on the document (thanks @j0hnskot, #863) 2014-07-01 15:46:32 +01:00
photonstorm
8b9aec320b Readme updates. 2014-07-01 15:46:32 +01:00
photonstorm
8c11ec1037 Updated readme. 2014-07-01 15:08:12 +01:00
photonstorm
181fd1ae56 Merged Pixi 1.5.4 with Phaser - all of the lovely new Pixi features are in, like complex Graphics objects and masking. 2014-07-01 15:03:46 +01:00
photonstorm
3d80568e4c Loader.isLoading is set to false if the filelist size is zero. 2014-06-30 09:24:25 +01:00
photonstorm
692ca928f0 Updated docs. 2014-06-29 21:19:37 +01:00
photonstorm
3ebb13c4b0 PR updates 2014-06-24 00:10:54 +01:00
photonstorm
907ba55478 Huge number of gamepad updates to get it working properly on Chrome again. Firefox debugging tomorrow. 2014-06-11 04:25:30 +01:00
photonstorm
0587d944b3 Added PlayStation 3 controller button mappings to Phaser.Gamepad (thanks @wayfu #887) 2014-06-11 00:25:58 +01:00
photonstorm
50e47d89ee ArcadePhysics.Body.setSize if you set offset x/y values previously and then passed zero values they would be ignored (thanks @casensiom fix #889) 2014-06-11 00:21:04 +01:00
photonstorm
e923e230e0 TilemapLayers can now be used with an unbounded camera (a camera that can move beyond the world boundaries). Currently, when an unbounded camera moves outside of the world, tilemaps start acting weird because they only render themselves strictly within the world limits. With this change, the tilemap will continue scrolling and show empty space beyond its edge (thanks @jotson #851)
TilemapLayer.wrap property - if true the map is rendered as if it is on the surface of a toroid (donut) instead of a plane. This allows for games that seamlessly scroll from one edge to the opposite edge of the world without noticing the transition. Note that the World size must match the Map size (thanks @jotson #851)
2014-06-11 00:15:02 +01:00
photonstorm
78c4e62cfe BitmapData.getPixel fix for pixels with zero red value (thanks @lstor fix #894)
If you call ArcadePhysics.collide on a Sprite vs. a Tilemap and provide a custom processCallback, the result was being ignored and the sprite was being separated regardless (thanks @aivins fix #891 #890)
2014-06-11 00:02:06 +01:00
photonstorm
b979243a8d Removed the cacheKey parameters from the AnimationParser methods as they're no longer used. 2014-06-10 23:50:12 +01:00