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
photonstorm
7c7d9153e6
Sprite.crop (and Image.crop) has been completely overhauled. You can now crop animated sprites (sprite sheet and texture atlas), you can define the x/y crop offset and the crop rectangle is exposed in the Sprite.cropRect property.
...
Sprite.updateCrop is available if you wish to update an externally referenced crop rectangle.
Sprites and Images now have their own textures objects, they are no longer references to those stored in the global Pixi.TextureCache. This allows you to redefine the texture frame dynamically without messing up any other Sprites in your game, such as via cropping. They still share global Base Textures, so image references are kept to a minimum.
Sprite.resetFrame will revert the Sprites texture frame back to its defaults dimensions. This is called when you call Sprite.crop with no rectangle, to reset the crop effect, but can be userful in other situations so we've left it as a public method.
2014-06-10 23:37:33 +01:00
photonstorm
6d10be6baa
When creating a Sprite or Image using a texture atlas it would set the frame twice, once in loadTexture and once when the initial frame is set. This has been reduced down to just a single setting now.
2014-06-10 11:21:07 +01:00
photonstorm
ee5f6457c8
Swapped to using escaped Unicode characters for the console output.
2014-06-09 16:15:41 +01:00
photonstorm
9aa10f7521
Sound.pause will no longer fire a Sound.onStop signal, and the pause values are set before the onPause signal is dispatched (thanks @AnderbergE, fix #868 )
2014-06-05 02:55:20 +01:00
photonstorm
369e2cc2d0
Sound.destroy(true) would call remove on the SoundManager, which in turn would throw a TypeError as it tried to remove the sound events twice (thanks @AnderbergE, fix #874 )
2014-06-05 02:50:53 +01:00
photonstorm
1c9e23f535
Emitter.start has a new parameter: forceQuantity which will force the quantity of a flow of particles to be the given value (request #853 )
...
Emitter.explode is a new short-cut for exploding a fixed quantity of particles at once.
Emitter.flow is a new short-cut for creating a flow of particles based on the given frequency.
2014-06-02 01:15:58 +01:00
photonstorm
12252944fa
Time.add allows you to add an existing Phaser.Timer to the timer pool (request #864 )
2014-06-02 00:54:42 +01:00
photonstorm
917c7491cd
Canvas.create has deprecated the noCocoon parameter as it's no longer required. The parameter is still in the signature, but no longer used in the method.
2014-05-30 02:03:07 +01:00
photonstorm
6e8694d5f7
A Canvas style set from a game config object used an incorrect property (thanks @TatumCreative, fix #861 )
2014-05-30 02:01:33 +01:00
photonstorm
edc1507b4e
Resolved issue where Cocoon won't render a scene in Canvas mode if there is only one Sprite/Image on it.
2014-05-29 23:52:13 +01:00
photonstorm
eee1183a6a
Forces use of a Canvas Renderer under CocoonJS automatically.
...
The SoundManager no longer requires a touch to unlock it, defaults to unlocked.
2014-05-29 23:17:18 +01:00
photonstorm
0c675f741f
Wrapped all events that CocoonJS doesn't support in conditional checks to avoid Cocoon Warnings.
2014-05-29 22:25:40 +01:00
photonstorm
5a42a41608
Updated the JSON format.
2014-05-29 17:25:20 +01:00
photonstorm
5b5bdc80d9
Loader.pack will allow you to load in a new Phaser Asset Pack JSON file. An Asset Pack is a specially structured file that allows you to define all assets for your game in an external file. The file can be split into sections, allowing you to control loading a specific set of files from it. An example JSON file can be found in the resources
folder and examples of use in the Phaser Examples repository.
...
Loader.totalQueuedPacks returns the number of Asset Packs in the queue.
Loader.totalLoadedPacks returns the number of Asset Packs already loaded.
2014-05-29 17:05:13 +01:00
photonstorm
066ab633a6
Loader.tilemap has renamed the mapURL
parameter to url
and mapData
to data
to keep it consistent with the other Loader methods.
...
Loader.physics has renamed the `dataURL` parameter to `url` and `jsonData` to `data` to keep it consistent with the other Loader methods.
2014-05-29 04:44:23 +01:00
photonstorm
af1508de8f
BitmapData.addToWorld will create a new Phaser.Image object, assign the BitmapData to be its texture, add it to the world then return it.
...
BitmapData.copyPixels now accepts a Sprite, Image, BitmapData, HTMLImage or string as its source.
2014-05-29 03:30:21 +01:00
photonstorm
2219e6f1c9
Timer.ms would report the game time ms value if the Timer hadn't yet been started, instead of 0.
...
Timer.seconds would report the game time value if the Timer hadn't yet been started, instead of 0.
2014-05-28 23:27:26 +01:00
photonstorm
0c76e9aada
Sprite animation data wasn't reset when going from a sprite sheet to a single frame in Sprite.loadTexture (thanks @lucbloom, fix #850 )
2014-05-27 14:23:41 +01:00
photonstorm
5a0d5b4887
RetroFont now uses Phaser.scaleModes.NEAREST by default for its RenderTexture to preserve scaling.
2014-05-27 13:36:38 +01:00
photonstorm
cdde45a292
Phaser.RenderTexture incorrectly passed the scaleMode to Pixi.RenderTexture, causing the renderer to error.
2014-05-27 13:35:47 +01:00
photonstorm
9c35dfde0c
ArcadePhysics.Body has a new boolean property enable
. If false
the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself.
2014-05-27 11:22:58 +01:00
photonstorm
5b9bd96583
RetroFont.updateOffset allows you to modify the offsetX/Y values used by the font during rendering.
2014-05-27 05:23:34 +01:00
photonstorm
890d90af4d
Keyboard.addCallbacks now has a new parameter for keypress event capture.
...
Keyboard.pressEvent stores the most recent DOM keypress event.
Keyboard.processKeyDown now runs the callback after all the objects have been created and/or updated.
Keyboard.processKeyUp now runs the callback after all the objects have been created and/or updated.
Phaser.Keyboard.lastChar will return the string value of the last key pressed.
Phaser.Keyboard.lastKey will return the most recently pressed Key object.
2014-05-27 04:26:37 +01:00
photonstorm
68f1bbd9a5
RetroFont charsPerRow paramters is now optional. If not given it will take the image width and divide it by the characterWidth value.
2014-05-27 04:26:23 +01:00
photonstorm
f007a77f3d
Fixed Gamepad issue that incorrectly checked non-webkit prefix gamepads.
2014-05-26 22:02:53 +01:00
photonstorm
86c228d380
Group.destroy now removes any set filters (thanks @Jmaharman fix #844 )
2014-05-26 20:13:00 +01:00
photonstorm
c5d9f12858
BitmapData.alphaMask has 2 new optional parameters: sourceRect and maskRect to give more fine-grained control over where the source and mask are drawn and their size
...
BitmapData.draw now has two optional parameters: width and height, to let you stretch the image being drawn if needed.
2014-05-24 03:58:00 +01:00
photonstorm
7846da7c90
BitmapData.alphaMask 'mask' parameter is now optional, if not given it will use itself as the mask.
...
BitmapData.alphaMask now calls BitmapData.update after running.
2014-05-24 03:17:58 +01:00
photonstorm
6e9c9c10b8
BitmapData.alphaMask can now also take a Phaser.Sprite, Phaser.Image or BitmapData object as a source type.
...
BitmapData.alphaMask has 4 new optional parameters: x, y, x2 and y2 to control exactly where the source and mask images are drawn.
2014-05-24 03:15:13 +01:00
photonstorm
f3ef3aed19
BitmapData.draw can now take a BitmapData object as a source type.
2014-05-24 02:43:59 +01:00
photonstorm
934f6a816c
BitmapData.resize now properly updates the baseTexture and texture dimensions.
2014-05-24 02:02:49 +01:00
photonstorm
7b696dddfe
BitmapData.extract has 4 new parameters: r2, g2, b2, a2 which let you re-color the extract pixels as they are drawn to the new BitmapData.
...
BitmapData.load will take a game object or string and resize the BitmapData to match it and then draw the pixels in.
2014-05-24 01:29:47 +01:00
photonstorm
bcddfc83c0
Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841 )
2014-05-21 21:48:29 +01:00
photonstorm
2a73652ed8
Preparing for 2.0.6 "Jornhill" development.
2014-05-20 10:56:45 +01:00
photonstorm
560a44f06e
README fixes for 2.0.5 release.
2014-05-20 10:37:51 +01:00
photonstorm
43e079a53a
Readme update.
2014-05-20 10:31:55 +01:00
photonstorm
8f07796af3
2.0.5 readme updates.
2014-05-20 10:03:02 +01:00
photonstorm
7b876d5fc4
ScaleManager.bounds is a Rectangle object that holds the exact size of the game canvas, taking DOM offset and game scale into account.
...
Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves.
Stage.bounds is now updated if the game canvas offset changes position. Note that it gives the un-scaled game dimensions.
2014-05-19 18:49:59 +01:00
photonstorm
c9656e48de
Group.hasProperty fixed to not use hasOwnProperty, but a series of in
checks (thanks @mgiuffrida for the idea, #829 )
2014-05-19 13:11:58 +01:00
photonstorm
1a7305b0ad
New movement data added for a Pointer Locked mouse (Pointer.movementX/Y) (thanks @woutercommandeur, #831 )
2014-05-19 11:51:25 +01:00
photonstorm
da75a22e82
Cache.checkKey added - allows you to pass in a Cache type and a key and return a boolean.
...
Cache.checkCanvasKey(key) - Check if a Canvas key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextureKey(key) - Check if a Texture key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkSoundKey(key) - Check if a Sound key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextKey(key) - Check if a Text key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkPhysicsKey(key) - Check if a Physics key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTilemapKey(key) - Check if a Tilemap key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBinaryKey(key) - Check if a Binary key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapDataKey(key) - Check if a BitmapData key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapFontKey(key) - Check if a BitmapFont key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkJSONKey(key) - Check if a JSON key exists in the cache (thanks to @delta11 for the proposal)
2014-05-19 11:34:14 +01:00
photonstorm
cfadaf3e70
Tilemap.layer is a getter/setter to the current layer object (which can be changed with Tilemap.setLayer)
2014-05-15 22:30:32 +01:00
photonstorm
1d13855abb
Tilemap.searchTileIndex allows you to search for the first tile matching the given index, with optional skip and reverse parameters.
2014-05-15 19:56:56 +01:00
photonstorm
2650e6c47e
RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
...
RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
2014-05-15 15:32:59 +01:00
Richard Davey
21011c3d03
mouseout handler
2014-05-14 22:56:42 +01:00
photonstorm
5d8a11ae29
Input.addMoveCallback allows you to bind as many callbacks as you like to the DOM move events (Input.setMoveCallback is now flagged as deprecated)
...
Input.deleteMoveCallback will remove a previously set movement event callback.
2014-05-14 03:01:24 +01:00
photonstorm
b90bcc442c
If an object was drag enabled with bringToTop, the onDragStop event wouldn't fire until the mouse was next moved (thanks @alpera, fix #813 )
2014-05-14 02:42:55 +01:00
photonstorm
cc9a234c8c
Color.getRGB would return incorrect color components if a color value without alpha was given, now works with both 0xRRGGBB and 0xAARRGGBB.
...
Color.getWebRGB now works regardless if you give an 0xRRGGBB or 0xAARRGGBB color value.
2014-05-14 02:09:44 +01:00
photonstorm
798d7a4fd1
Stage.backgroundColor now properly accepts hex #RRGGBB and color values 0xRRGGBB again ( fix #785 )
2014-05-14 01:59:21 +01:00
photonstorm
0bfa249ed5
Key.justPressed and justReleased incorrectly set the delay value to 2500ms. Now defaults to 50ms (thanks @draklaw, fix #797 )
2014-05-14 00:24:09 +01:00
photonstorm
8d8c3cb595
The Tiled JSON parser will now include Tiled polygons, ellipse and rectangle geometry objects in the resulting map data (thanks @tigermonkey, #791 )
2014-05-14 00:10:08 +01:00
photonstorm
b2c68c1369
Graphics.drawTriangles will draw an array of vertices to the Graphics object (thanks @codevinsky, #795 )
...
Polygon.area will calculate the area of the Polygon (thanks @codevinsky, #795 )
2014-05-14 00:04:31 +01:00
photonstorm
6f1ba28b73
README updates.
2014-05-13 23:43:44 +01:00
photonstorm
5047606118
Button.onOverMouseOnly is a boolean that causes onOver events to fire only if the pointer was a mouse (i.e. stops onOver sounds triggering on touch)
2014-05-13 23:43:44 +01:00
photonstorm
0d2fa2733a
Timer class updated so that code-resumed pauses don't mess up the internal _pausedTotal value (thanks @joelrobichaud, fix #814 )
...
Timer class when paused by code after a game-level pause wouldn't set the codepaused flag (thanks @joelrobichaud, fix #814 )
2014-05-09 16:41:48 +01:00
photonstorm
86f6b114e8
Sound.stop on Samsung S4 would randomly throw a DOM error. Wrapped the audio stop in a try/catch (thanks FSDaniel)
2014-05-09 16:39:45 +01:00
photonstorm
c32706f98c
Phaser.Utils.transposeArray will transpose the given array and return it.
...
Phaser.Utils.rotateArray will rotate the given array by 90 or 180 degrees in either direction and return it.
2014-05-08 02:17:37 +01:00
photonstorm
5eb7ae2cb0
Plugins moved to their own new repo.
2014-05-08 01:57:21 +01:00
photonstorm
410bc389ed
Tidying up ready to move the plugins to their own repo.
2014-05-08 01:57:21 +01:00
photonstorm
041bbd430c
Tilemap.getTile has a new nonNull parameter. If true it won't return null
for empty tiles, but will return the actual Tile in that location.
2014-05-07 01:30:48 +01:00
photonstorm
6070bc63bc
Sound.play now returns the Sound object (thanks @AnderbergE, fix #802 )
2014-05-07 00:12:41 +01:00
photonstorm
91f8f96a76
TilemapWalker allows you to set a location marker into a tilemap. You can then move around with commands such as moveForward, turnLeft, etc.
...
New consts: Phaser.Tilemap.NORTH, SOUTH, EAST and WEST to use with the TileMapWalker Plugin.
2014-05-07 00:10:48 +01:00
photonstorm
2b40c8a7c7
Pointer.type and Pointer.exists properties added.
...
QuadTree.retrieve can now accept either a Sprite with a physics body or a Phaser.Rectangle as its parameter.
ArcadePhysics.getObjectsUnderPointer will return all children from a Group that overlap with the given Pointer.
2014-05-06 02:45:10 +01:00
photonstorm
ad7e2aff1f
Input.getPointerFromId will return a pointer with a matching pointerId value, if any. pointerId is a value set by the browser in the DOM event.
2014-05-02 12:21:57 +01:00
photonstorm
842abb82d3
Pointer.pointerId added which is set by the DOM event (if present in the browser). Note that browsers can and do recycle pointer IDs.
2014-05-02 12:14:05 +01:00
photonstorm
f38ccf9afe
Phaser.Tween.from allows you to set tween properties that will end up where the current object is (thanks @codevinsky, #792 )
2014-05-01 23:51:21 +01:00
photonstorm
4466b3cd5d
Input.getPointerFromIdentifier docs update to reflect where the identifier comes from. Pointer properties now set to give it fixed defaults (thanks @JirkaDellOro, #793 )
2014-05-01 23:35:40 +01:00
photonstorm
3f51721131
Readme updates.
2014-05-01 11:45:40 +01:00
photonstorm
a01b8f2387
Doc updates.
2014-05-01 02:42:06 +01:00
photonstorm
a7fe3a5346
Line.pointOnLine corrected algorithm (thanks @woutercommandeur, fix #784 )
2014-04-30 11:57:52 +01:00
photonstorm
046707bc92
Merge branch 'origin/master'
2014-04-29 22:58:44 +01:00
photonstorm
dad90a6bdd
readme update.
2014-04-29 22:36:46 +01:00
photonstorm
55dc748953
Tilemap.getTile and getTileXY used to return null
in 2.0.3 but returned a Tile object in 2.0.4 (with an index of -1), they now return null
again.
2014-04-29 21:28:14 +01:00
photonstorm
fa613c5fe1
ScaleManager seeds _check private var with null to avoid later comparison check (thanks @jflowers45, fix #782 )
...
P2.Body.applyForce should have used pxmi instead of pxm (thanks @Trufi, fix #776 )
P2 fixed creation of RevoluteConstraint by passing maxForce in the options (thanks @woutercommandeur, fix #783 )
2014-04-29 19:34:38 +01:00
photonstorm
eb86f612b3
Prep for 2.0.5 development.
2014-04-29 16:25:10 +01:00
photonstorm
75a848f0ef
Loader now uses XDomainRequest in IE9 to load JSON data to help with CORS issues.
2014-04-29 14:41:26 +01:00
photonstorm
9135b05ff7
readme updates
2014-04-29 04:04:24 +01:00
photonstorm
2449c71331
readme updates.
2014-04-29 03:50:33 +01:00
photonstorm
8fc33506f1
Tidying the readme.
2014-04-29 03:49:12 +01:00
photonstorm
90cb20cc11
readme updates.
2014-04-29 03:28:11 +01:00
photonstorm
010c2de41b
Updated readme for 2.0.4 release.
2014-04-29 03:18:13 +01:00
photonstorm
1d37cde66f
Updated p2 to latest build and patched for Float32Array + UMD issues.
2014-04-29 02:34:16 +01:00
photonstorm
06c69951c1
New Phaser Project Template specifically for requireJS in the resources/Project Templates
folder (many thanks @ashatch)
2014-04-29 02:14:13 +01:00
photonstorm
b32312dca5
Animation.setFrame allows you to set the animation to a specific frame (thanks @adamholdenyall, #706 )
2014-04-28 23:35:08 +01:00
photonstorm
74108148ac
CSV Tilemap tiles would incorrectly set the Tile layer reference, causing collision to fail (thanks @Chapelin, fix #692 )
2014-04-28 23:21:57 +01:00
photonstorm
57775e9e86
Fixed Timer issue where pausing then restarting could add to the duration of running manual timers ( fix #759 )
2014-04-28 22:08:13 +01:00
photonstorm
a5cbd8f2a6
Fixed an issue where Sounds that had been paused via game code would un-mute if the game paused and resumed.
2014-04-28 20:30:47 +01:00
photonstorm
e85bbf8bc5
Text.updateText now sets the lineCap to round
to avoid occassional font glitching issues in Chrome.
2014-04-28 15:17:47 +01:00
photonstorm
360d744472
Camera.unfollow allows you to easily unfollow a tracked object (thanks @alvinsight, #755 )
2014-04-28 14:56:48 +01:00
photonstorm
8812d20162
Testing some small time tweaks.
2014-04-28 14:52:09 +01:00
photonstorm
e9436293a8
Tilemap.addTilesetImage will now raise a console.warn if you specify an invalid tileset key and not create the tileset rather than pick the default set.
2014-04-28 13:47:27 +01:00
photonstorm
348e3c14bd
LoaderParser.bitmapFont updated so xml parsing works properly on IE9 (thanks @georgiee)
2014-04-28 13:35:30 +01:00
photonstorm
838027a93b
Timer.timeCap is a new setting allowing your Timers to protect against unexpectedly large delta timers.
2014-04-28 13:22:29 +01:00
photonstorm
de9fc08e7d
Color.updateColor - updates an existing color object to update the rgba property.
...
Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel, you can optionally set the saturation and value amounts.
Color.HSLColorWheel will return an array with 360 color objects for each segment of an HSL color wheel, you can optionally set the saturation and lightness amounts.
2014-04-28 04:19:26 +01:00
photonstorm
27d62aa147
Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel.
2014-04-28 03:25:45 +01:00
photonstorm
65022ccc55
Blank Tilemaps no longer create null
tiles, but instead create Tile objects with an index of -1 which can be replaced and updated like any other tile.
...
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:42:38 +01:00
photonstorm
b1153299c0
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:23:07 +01:00
photonstorm
3f23b3dc52
Fixed issue where Animations resuming from a pause would skip frames (thanks @merixstudio, fix #730 )
2014-04-28 01:48:46 +01:00
photonstorm
1d48b3c5f2
Your State can now have a pauseUpdate method, which is called constantly when the game is paused.
...
The Input system is now updated even while the game is paused.
2014-04-28 00:07:40 +01:00
photonstorm
6e5415fc31
Point.interpolate - Interpolates the two given Points, based on the f
value (between 0 and 1) and returns a new Point.
2014-04-27 11:16:06 +01:00
photonstorm
8dd67ea6ec
Point.dot - get the dot product of two Point objects.
...
Point.cross - get the cross product of two Point objects.
Point.cross - get the cross product of two Point objects.
Point.perp - make the Point perpendicular (90 degrees rotation)
Point.rperp - make the Point perpendicular (-90 degrees rotation)
Point.normalRightHand - Right-hand normalize (make unit length) a Point.
Point.angle - Returns the angle between this Point object and another object with public x and y properties.
Point.angleSq - Returns the angle squared between this Point object and another object with public x and y properties.
Point.getMagnitudeSq - Calculates the length squared of the Point object.
Point.project - Project two Points onto another Point.
Point.projectUnit - Project two Points onto a Point of unit length.
Point.multiplyAdd - Adds two 2D Points together and multiplies the result by the given scalar.
Point.negative - Creates a negative Point.
2014-04-27 11:09:57 +01:00
photonstorm
7a64f53006
Fixed Polygon.contains for coordinates to the left of the polygon (thanks @vilcans, fix #766 )
2014-04-27 09:56:29 +01:00
photonstorm
2cba2a0e2b
Point.dot - get the dot product of two Point objects.
...
Point.cross - get the cross product of two Point objects.
Point.cross - get the cross product of two Point objects.
Point.perp - make the Point perpendicular (90 degrees rotation)
Point.rperp - make the Point perpendicular (-90 degrees rotation)
2014-04-26 20:35:31 +01:00
photonstorm
b6c2b4e0bf
Updated to [Pixi.js 1.5.3]( https://github.com/GoodBoyDigital/pixi.js/releases/tag/v1.5.3 )
2014-04-25 16:55:09 +01:00
photonstorm
54b71ddc23
Phaser.ArrayList is a new iterative object, similar in principal to a linked list but operating on a single array without modifying the object structure.
...
Input and Pointer now use the new ArrayList instead of a LinkedList, which resolve list item removable during callback issues.
Input.reset no longer resets every interactive item it knows of, because they are removed during the destroy phase and can now persist between States if needed.
2014-04-25 15:11:54 +01:00
photonstorm
11ca2deaf6
Finally - fully working setHSL and shiftHSL.
2014-04-25 02:45:35 +01:00
photonstorm
387ff4f0fa
BitmapData.processPixelRGB lets you perform a custom callback on every pixel in the BitmapData.
2014-04-24 05:20:45 +01:00
photonstorm
c88fa2bd91
Loads of BitmapData updates. More details soon.
2014-04-24 03:49:49 +01:00
photonstorm
0f1e0a3d4e
Updated the Device little / big endianess check.
2014-04-23 23:35:36 +01:00
photonstorm
b6cc150a15
Game.scratch is a single handy BitmapData instance that can be used as a visual scratch-pad, for off-screen bitmap manipulation (and is used as such by BitmapData itself).
...
Updated TS defs.
2014-04-23 22:14:47 +01:00
photonstorm
87bcb6677d
Group.classType allows you to change the type of object that Group.create or createMultiple makes to your own custom class.
2014-04-23 21:49:58 +01:00
photonstorm
4ec5665148
Fixed #750 - Invalid typescript mapping for TileSprite.autoScroll function in TS defs.
...
Game checks if window.console exists before using it (should fix IE9 issues when dev tools are closed), however it is still used deeper in Pixi.
Body.loadData flagged as deprecated.
2014-04-22 23:31:07 +01:00
photonstorm
944e03ddb8
P2.Body.loadPolygon has been updated to correct center of mass issues (thanks @georgiee, fix #749 )
2014-04-22 22:33:25 +01:00
photonstorm
06878407e8
RandomDataGenerator.integerInRange uses a new method of rounding the value to an integer to avoid distribution probability issues (thanks PhaserFan)
2014-04-22 11:01:15 +01:00
photonstorm
e4887c8177
If Tween.yoyo was true but repeat was 0 then it wouldn't yoyo. Now if yoyo is set, but not repeat, the repeat count gets set to 1 (thanks @hilts-vaughan, fix #744 )
2014-04-22 02:12:21 +01:00
photonstorm
6ace9e6031
Made jsdocs clear that Point.set/setTo 2nd parameter is optional ( fix #743 )
2014-04-22 02:02:56 +01:00
photonstorm
f3922002a1
Circle.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745 )
...
Point.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745 )
2014-04-22 01:52:24 +01:00
photonstorm
0b1fb5a637
Destroying an object with an input handler during its onDown event would throw Signals dispatch errors (thanks @jflowers45, fix #746 )
...
InputHandler._setHandCursor private var wasn't properly set, meaning the hand cursor could sometimes remain (during destroy sequence for example)
All Game Objects have a new property: destroyPhase (boolean) which is true if the object is in the process of being destroyed, otherwise false.
The PIXI.AbstractFilter is now included in the Phaser Pixi build by default, allowing for easier use of external Pixi Filters.
2014-04-22 01:43:22 +01:00
Richard Davey
bf10cfa58f
Added ghosting info to Keyboard docs.
2014-04-20 01:57:32 +01:00
Richard Davey
e033ec9e86
The Emitter no longer checks minParticleScale = maxParticleScale, allowing for fixed scale particles again
2014-04-20 01:57:32 +01:00
photonstorm
3e6a88fff6
Group.remove now checks the child to see if it's a member of the root Group before removing it, otherwise Pixi throws an Error.
2014-04-17 12:47:36 +01:00
photonstorm
713bd203ee
ArcadePhysics.collideSpriteVsGroup checks if Sprite has a body before carrying on, now safely skips sub-groups or other non-Sprite group children.
...
QuadTree.retrieve now checks to see if the given Sprite has a body before carrying on.
2014-04-17 12:31:14 +01:00
photonstorm
ce592d48bf
Group.destroy checks parent before removing (thanks @clark-stevenson, fix #733 )
2014-04-17 12:18:39 +01:00
photonstorm
7c9f079ce5
Group.setProperty will now check if the property exists before setting it, this applies to Group.setAll and anything else using setProperty internally.
2014-04-17 12:11:37 +01:00
photonstorm
b77c034f61
World.wrap will take a game object and if its x/y coordinates fall outside of the world bounds it will be repositioned on the opposite side, for a wrap-around effect.
2014-04-16 22:59:19 +01:00
photonstorm
089dfbb960
Group.resetCursor will reset the Group cursor back to the start of the group, or to the given index value.
2014-04-16 21:39:04 +01:00
photonstorm
5f455791d4
TypeScript defs update (thanks @cheshirepuss42, ping to @clark-stevenson to ensure merge with his master version :)
2014-04-15 03:24:54 +01:00
photonstorm
3b73c17997
ArcadePhysics.Body.phase is checked in postUpdate to prevent it from being called multiple times in a single frame.
2014-04-15 02:50:25 +01:00
photonstorm
1164bf85ac
Line.angle and Math.angleBetween used Math.atan2 arguments in the wrong order (thanks @jotson, fix #724 )
2014-04-15 02:12:33 +01:00
photonstorm
eeff786eb2
StateManager.restart incorrectly skipped the first additional parameter after clearCache (thanks @mariusbrn, fix #722 )
2014-04-14 23:34:13 +01:00
photonstorm
25a93cf4af
AnimationManager.play will now call Animation.stop on the current animation before switching to the new one (thanks @nihakue, #713 )
2014-04-14 23:29:09 +01:00
photonstorm
5d0ea6453b
AnimationManager.destroy now iterates through child animations calling destroy on all of them, avoiding a memory leak (thanks stauzs)
...
Animation.destroy didn't correctly clear the onStart, onLoop and onComplete signals.
2014-04-14 22:53:05 +01:00
photonstorm
a7f6165e39
InputManager.resetLocked - If the Input Manager has been reset locked then all calls made to InputManager.reset, such as from a State change, are ignored.
...
Keyboard.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
Key.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
2014-04-14 21:53:08 +01:00
photonstorm
055cb8058d
Device.crosswalk detects if your game is running under Intels Crosswalk XDK.
2014-04-14 16:40:14 +01:00
photonstorm
e9cb345261
P2.World.convertTilemap now correctly checks the collides parameter of the tiles as it converts them.
2014-04-14 13:52:53 +01:00
photonstorm
f70e4d7d90
Fixed the use of the destroy parameter in Group.removeAll and related functions (thanks @AnderbergE, fix #717 )
2014-04-14 12:57:29 +01:00
photonstorm
f33ba5dcc7
Timer has removed all use of local temporary vars in the core update loop.
...
Timer.clearPendingEvents will purge any events marked for deletion, this is run automatically at the start of the update loop.
The main Timer loop could incorrectly remove TimeEvent if a new one was added specifically during an event callback (thanks @garyyeap, fix #710 )
2014-04-14 11:51:50 +01:00
photonstorm
0d15350755
Preparing for 2.0.4 development.
2014-04-11 14:29:38 +01:00
photonstorm
cdff873cf7
Updated change log and readme headers.
2014-04-11 13:28:17 +01:00
photonstorm
7b2c3e8e0f
Updated header styles in readme.
2014-04-11 13:15:41 +01:00
photonstorm
4cea8d7bcc
Preparing for final 2.0.3 release. Updated docs, readme and build files.
2014-04-11 13:09:28 +01:00
photonstorm
a2b2d558a5
jsdoc and jshint fixes.
2014-04-11 03:02:19 +01:00
photonstorm
3d7ca639c3
Fixed the vectors used in the BlurX and BlurY filters (thanks @nickryall, fix #668 )
2014-04-11 01:01:47 +01:00
photonstorm
77f8e5eefc
P2 Fixtures Collection Class (@georgiee please test it works ok! #704 )
2014-04-11 00:43:30 +01:00
photonstorm
3a1c202e24
jsdoc fixes for SignalBindings.
2014-04-11 00:19:37 +01:00
photonstorm
a01cc2e1ca
Objects with an InputHandler now deactivate it when the object is removed from a Group but not destroyed ( fix #672 )
...
Lots of jsdoc fixes in Body and World.
Removed un-used events from World (such as onImpact).
2014-04-11 00:06:22 +01:00
photonstorm
9ddcc5d0ea
p2.World.defaultRestitution has been deprecated and is now p2.World.restitution.
...
p2.World.defaultFriction has been deprecated and is now p2.World.friction.
p2.World now uses 4 bodies for the world boundaries, rather than 1 body with 4 shapes. This helps the broadphase massively.
p2.World bounds are now included in the callback events such as beginContact and impact events.
2014-04-10 17:11:16 +01:00
photonstorm
780fb48ab3
P2.World has a new contactMaterial property, which can be configured like a normal P2 Contact Material and is applied when two bodies hit that don't have defined materials.
2014-04-10 14:51:20 +01:00
photonstorm
78aa24f04b
Emitter.setScale now allows you to scale the x and y axis of the particles independently.
2014-04-10 05:18:06 +01:00
photonstorm
c8ca3d1809
Emitter now calls the Phaser.Particle.onEmit function, which is left empty for you to override and add in custom behaviours.
2014-04-10 01:37:10 +01:00
photonstorm
95b0532f59
Emitter.setScale has a new 'rate' parameter which allows particles to change in scale over time, using any Easing value or timescale.
...
Emitter.setAlpha has a new 'rate' parameter which allows particles to change alpha over time, using any Easing value or timescale.
Emitter.bringToTop and Emitter.sendToBack are booleans that let you optionally set the display order of the Particle when emitted.
2014-04-10 01:36:05 +01:00
photonstorm
770ced8ac1
Group.customSort allows you to sort the Group children based on your own sort function.
2014-04-10 00:56:53 +01:00
photonstorm
be52515ed4
PluginManager parent parameter removed as it's redundant. Also most core functions tidied up and jsdocs fixed.
2014-04-09 16:12:25 +01:00
photonstorm
50981fd729
Emitter now has minParticleAlpha and maxParticleAlpha values for setting a random alpha on emitted particles.
...
Emitter.particleAnchor allows you to control the anchor of emitted Particles. Defaults to 0.5 (same as before) but now under your control.
Emitter now emits Phaser.Particle objects instead of Phaser.Sprites, which can be extended as required.
Emitter has had various local properties removed that were already declared in Phaser.Group which it extends.
2014-04-09 14:29:23 +01:00
photonstorm
73d0414672
Grunt update to dev dependencies (thanks @xtian, #695 )
2014-04-09 12:23:17 +01:00
photonstorm
b9cb2417b6
Group.removeBetween now properly iterates through the children.
2014-04-09 03:19:36 +01:00
photonstorm
01ccbd97c0
Key.enabled boolean allows you to toggle if a Key processes its update method or dispatches any events without deleting and re-creating it.
2014-04-09 02:29:41 +01:00
photonstorm
e764be430e
Emitter.minParticleScale and maxParticleScale wasn't resetting the Body size correctly.
2014-04-09 00:59:53 +01:00
photonstorm
8fc2a465cd
New Phaser package, small docs updates and preparing P2.World for new bounds code and v0.5.0 migration.
2014-04-08 03:31:13 +01:00
photonstorm
01eec6cef5
Keyboard.stop nulls the function references after removing the event listeners (thanks @bmceldowney, #691 )
2014-04-07 12:29:26 +01:00
photonstorm
bf32590cfe
Fixed a few jsdoc errors.
2014-04-07 12:29:26 +01:00
photonstorm
38d722c1e5
Tilemap.removeTile(x, y, layer) lets you remove the tile at the given coordinates and updates the collision data.
...
Tilemap.removeTileWorldXY lets you remove the tile at the given pixel value coordinates and updates the collision data.
If you pass `null` to Tilemap.putTile as the tile parameter it will pass the call over to Tilemap.removeTile.
2014-04-01 13:36:42 +01:00
photonstorm
61429d8467
StateManager.restart allows you to quickly restart the *current* state, optionally clearing the world and cache.
2014-04-01 11:25:04 +01:00
photonstorm
a4ed94e039
Key.reset now clears any callbacks associated with the onDown and onUp events and nulls the onHoldCallback if set. Key.reset is called by Keyboard.reset when changing state.
2014-04-01 04:41:43 +01:00
photonstorm
439cefd481
ArcadePhysics.Body.hitTest(x, y) will return a boolean based on if the given world coordinate are within the Body or not.
...
Fixed jsdoc method tags in Body.
2014-04-01 03:54:20 +01:00
photonstorm
03b80887f2
SoundManager.removeByKey(key) will remove all sounds from the SoundManager that have a key matching the given value.
2014-04-01 03:42:30 +01:00
photonstorm
3728f25d68
SoundManager.remove(sound) now lets you remove a sound from the SoundManager, destroying it in the process.
...
Sound.destroy will remove a sound and all local references it holds, optionally removing itself from the SoundManager as well.
2014-04-01 03:38:13 +01:00
photonstorm
1f32ef721d
The Phaser Gruntfile is now split up into option tasks (thanks @xtian, #638 )
2014-04-01 01:47:42 +01:00
photonstorm
5ed79dfefe
The Phaser jshint process is now running on Travis (thanks @xtian, #656 )
2014-04-01 01:24:49 +01:00
photonstorm
5559fea0f8
The State.update function (and thus the update of any sub-classed Sprites or other objects) is now called before Stage, Tweens, Sound, Input, etc ( #662 )
2014-04-01 01:01:15 +01:00
photonstorm
0198a77fe6
Phaser.Point.centroid static function added to calculate the centroid or midpoint of an array of points (thanks @lewster32, #675 )
2014-04-01 00:42:13 +01:00
photonstorm
e3f1c7b21c
Added Pointer.positionUp which records the last point at which the pointer left the screen / was raised (thanks @Cryszon ,#676)
2014-04-01 00:40:26 +01:00
photonstorm
3f8911d95f
SoundManager.boot will check to see if the AudioContext was created before carrying on (thanks @keyle, fix #669 )
2014-03-31 11:22:44 +01:00
photonstorm
16853d0e82
Updated to Pixi 1.5.2 release.
2014-03-31 11:04:02 +01:00
photonstorm
686706173a
Timers can now have a start delay value (thanks @georgiee, #660 )
2014-03-31 10:49:53 +01:00
photonstorm
1a92f5b7d0
If you inputEnable = false a gameobject you couldn't re-enable it again using inputEnable = true, only directly via the handler (thanks @nickrall, fix #673 )
...
Updated the PhysicsEditor plugin to maintain position, radius, mask bits, category bits and sensor flags (thanks @georgiee, #674 )
2014-03-31 10:43:43 +01:00
photonstorm
b01ad969ab
Updated tutorial file
2014-03-30 20:52:27 +01:00
photonstorm
76c0913b37
Setting up for 2.0.3 development.
2014-03-28 02:18:58 +00:00
photonstorm
5b73bb21bb
Sprite would glitch if it had an ArcadePhysics Body that was re-positioned out of loop.
...
Sprite would "fly off" if it had an ArcadePhysics Body that was re-positioned during an input handler.
Newly generated docs
2014-03-28 01:42:49 +00:00
Richard Davey
06c953a293
Merge pull request #647 from xtian/grunt-jshint
...
Run jshint as part of build process and fix jshint errors
2014-03-26 15:46:35 +00:00
photonstorm
fc0e239719
ArcadePhysics.Body preUpdate has been modified to stop Sprites with non-1 scaling from gaining delta and moving off the screen ( fix #644 ).
...
Lots of ArcadePhysics.World methods have been marked as private where they shouldn't be called directly (separateX, etc)
2014-03-26 10:48:30 +00:00
Christian Wesselhoeft
12c5a1b534
Run jshint as part of build process.
2014-03-25 14:56:00 -07:00
photonstorm
344ab46d78
Line.fromSprite now sets "fromCenter" to false by default as Sprite.center is deprecated in 2.x. Documentation and Examples updated to reflect this.
2014-03-25 12:44:20 +00:00
photonstorm
6483b61db7
Tween.generateData would enter an eternal loop if the total resulted in a float. Now wrapped in Math.floor.
2014-03-25 03:08:51 +00:00
photonstorm
6651f6c394
Tutorial updated for Phaser 2
2014-03-24 23:38:52 +00:00
photonstorm
65e1ae51d8
Fixed small typos in the README.
2014-03-24 12:21:21 +00:00
photonstorm
622957c9b0
Timer objects incorrectly set the first tick value on events if you added the events prior to starting them.
2014-03-24 02:25:35 +00:00
photonstorm
e1c98ba617
You can now create multiple blank layers in a Tilemap.
2014-03-23 23:58:01 +00:00
photonstorm
0c156ccd90
Fixed some md issues in Contributing and Readme.
...
Fixed game reference in Emitter.
2014-03-23 12:07:55 +00:00
photonstorm
21c0be4d02
BitmapDatas when used as Game Object textures in WebGL now update themselves properly.
...
Timer.ms now correctly reports the ms time even if the Timer has been paused (thanks Nambew, fix #624 )
2014-03-21 18:37:54 +00:00
photonstorm
0fa54b0b24
TileSprites now emit outOfBounds and enterBounds events accordingly.
...
TileSprites working with physics bodies again.
2014-03-21 18:04:24 +00:00
photonstorm
9c8f01cd7f
The volume given in Sound.play now over-rides that set in Sound.addMarker if specified ( fix #623 )
2014-03-21 15:43:59 +00:00
photonstorm
0fca997d43
P2.Body.loadPolygon no longer modifies the Cache array ( fix #613 )
2014-03-21 13:46:35 +00:00
photonstorm
768bbaaec6
README updates.
2014-03-21 12:34:26 +00:00
photonstorm
b9fcda73ca
ArcadePhysics.World.seperate will now check gravity totals to determine separation order. You can set World.forceX to true to always separate on X first and skip this check.
2014-03-21 11:22:56 +00:00
photonstorm
111164e221
If no seed was given in the Game config object, the RandomDataGenerator wouldn't be started (thank tylerjhutchison fix #619 )
2014-03-21 11:22:56 +00:00
photonstorm
634b1d1093
Emitter.friction property removed and replaced with Emitter.particleDrag, which is now correctly applied.
...
ArcadePhysics.Body.reset incorrectly set the Body.rotation to Sprite.rotation instead of angle.
Emitter.emitParticle resets the rotation on the particle to zero before emitting it.
Lots of fixes to the TypeScript definitions file (thanks as always to clark-stevenson for his tireless work on these)
Emitters now bring the particle they are about to emit to the top of the Group before doing so. Avoids particles hidden behind others.
ArcadePhysics.Body.setSize corrected to take the parameters as positive, not negative values.
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608 )
Emitter.particleClass can now be set to any object that extends Phaser.Sprite, which will be emitted instead of a regular Sprite.
2014-03-20 03:48:54 +00:00
photonstorm
684ee9c064
ArcadePhysics.Body has a deltaMax object, which allows you to cap the delta applied to the position to +- this value.
...
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608 )
2014-03-20 00:20:02 +00:00
photonstorm
2d08fab48e
When creating a Sprite (via Group.create or directly) with exists = false and a P2 body, the body is not added to the world.
...
Every Input class now checks to see if it has already been started. If so it doesn't add the listeners again unless they have been nulled.
2014-03-19 13:22:04 +00:00
photonstorm
164f3cbe83
When creating a Sprite (via Group.create or directly) with exists = false and a P2 body, the body is not added to the world.
2014-03-19 13:09:29 +00:00
photonstorm
96365a3a1f
The StateManager is now responsible for clearing down input, timers, tweens, physics, camera and the World display list.
...
Removed the use of Int16Array from all Game Objects, swapped for standard Array. Phaser now runs on Android 2.x again (fix #590 )
2014-03-19 12:05:19 +00:00
photonstorm
5d40365b87
InputHandler.dragFromCenter will now work regardless of the anchor point of the Sprite.
2014-03-19 05:21:26 +00:00
photonstorm
84df7bf320
Sprite.events.onEnterBounds added. This is dispatched if the Sprite leaves the bounds but then returns. The opposite of onOutOfBounds.
2014-03-19 04:17:37 +00:00
photonstorm
0a42ac39b9
ArcadePhysics.World now has a checkCollision object which can be used to toggle collision against the 4 walls of its bounds.
2014-03-19 04:03:21 +00:00
photonstorm
9959e21925
Debug.spriteBounds will now take the position of the camera into consideration when rendering the bounds ( fix #603 )
2014-03-19 02:31:37 +00:00
photonstorm
79ffda3f18
ArcadePhysics.separate doesn't pass over to seperateX/Y if overlapOnly is true ( fix #604 )
...
ArcadePhysics.collideSpriteVsSprite checks if both objects have bodies before processing.
ArcadePhysics.Body now checks the ArcadePhysics.World bounds, not the game bounds.
ArcadePhysics.Body has reverted to the 1.1.3 method of preUpdate, so you can now position sprites with x/y, drag them, etc, regardless of the Body.moves flag (issue #606 )
ArcadePhysics.World now has setBounds and setBoundsToWorld methods, which are called automatically on world resizing.
ArcadePhysics.Body no longer sets the offset to match the anchor.
2014-03-19 02:28:20 +00:00
photonstorm
9490041c79
ArcadePhysics.separate doesn't pass over to seperateX/Y if overlapOnly is true ( fix #604 )
...
ArcadePhysics.collideSpriteVsSprite checks if both objects have bodies before processing.
2014-03-19 02:05:29 +00:00
photonstorm
11fdd62436
World.destroy incorrectly clashed with the Group.destroy method it over-rode, renamed to World.shutdown and updated StateManager accordingly.
...
World.shutdown now removes all children iteratively, calling destroy on each one, ultimately performing a soft reset of the World.
Objects with a scale.x or y of 0 are no longer considered valid for input (fix #602 )
InputHandler will set the browser pointer back to default if destroyed while over (fix #602 )
Group.destroy has a new parameter: `soft`. A soft destruction won't remove the Group from its parent or null game references. Default is `false`.
InputHandler.validForInput is a new method that checks if the handler and its owner should be considered for Pointer input handling or not.
Group.replace will now return the old child, the one that was replaced in the Group.
2014-03-19 00:54:49 +00:00
photonstorm
8010d245f1
Fixed Grunt script that stopped the P2 constraint classes from building properly.
2014-03-18 18:36:46 +00:00
photonstorm
eec9f70c1c
Math.removeRandom allows you to remove (and return) a random object from an array.
...
Updated TypeScript defs to fix getRandom (fix #583 )
2014-03-18 16:51:58 +00:00
photonstorm
870d534e50
Fixed the Loader.preloadSprite crop effect on WebGL.
2014-03-18 16:23:44 +00:00
photonstorm
a7ff5f884c
Added basic Webcam plugin.
...
Added Device.getUserMedia detection.
Updated config.php so you can toggle physics engines on/off via flags.
Updated Gruntfile.js so it builds a Phaser + Pixi but no Physics libs.
2014-03-18 15:14:28 +00:00
photonstorm
928b883c17
Swapped the order of the _pollGamepads gamepads check, to stop the Chrome 'webkitGamepads is deprecated' error in the console.
2014-03-18 00:10:43 +00:00
photonstorm
4a407f12a1
Button.onInputUpHandler wouldn't set an upFrame for a frame ID of zero, made the check more strict.
2014-03-17 23:57:27 +00:00
photonstorm
46d5069110
Tilemap.createFromObjects has a new parameter: adjustY, which is true by default. Because Tiled uses a bottom-left coordinate system Phaser used to set the Sprite anchor to 0,1 to compensate. If adjustY is true it now reduces the y value by the object height instead.
2014-03-17 23:54:04 +00:00
photonstorm
90ef694347
Tilemap.createFromObjects used to set the Sprite anchor to 0,1 because Tiled uses a bottom-left coordinate system. It now calculates the offset in TilemapParser.
2014-03-17 23:27:13 +00:00
photonstorm
2ecb0c7c76
P2.removeBody will check if the body is part of the world before removing, this avoids a TypeError from the p2 layer.
2014-03-17 22:34:19 +00:00
photonstorm
a8502f3498
Removed State.destroy empty method and replaced with State.shutdown, as that is what the StateManager expects ( fix #586 )
2014-03-17 19:43:28 +00:00
photonstorm
3ebd0d9303
Updated Device.isConsoleOpen as it no longer works in Chrome. Revised code and documentation accordingly ( fix #593 )
...
Revised p2 clear process.
2014-03-17 19:39:56 +00:00
photonstorm
96296c6582
The P2 World wouldn't clear down fully on a State change, now properly clears out contacts, resets the bitmask, etc.
2014-03-17 18:57:46 +00:00
photonstorm
bc8b2424ce
Removed the examples build script from the Gruntfile ( fix #592 )
2014-03-17 16:10:19 +00:00
photonstorm
b9ac0d565e
Fixed Tile callback check in Arcade Physics ( fix #562 )
2014-03-16 00:53:50 +00:00
photonstorm
ec2275e18c
Group enableBody parameter was incorrectly assigned to the debug var (thanks BurnedToast, fix #565 )
2014-03-16 00:45:47 +00:00
photonstorm
db88bd2f22
Fixed the IE11 version check ( fixes #579 )
2014-03-16 00:39:42 +00:00
photonstorm
fee4d36b91
Group.getAt comparison updated ( fixes #578 )
2014-03-15 23:53:05 +00:00
Richard Davey
fc5504f8d8
Fixed Sprite.destroy with an arcade body
2014-03-15 01:06:01 +00:00
photonstorm
5e11b1ad87
The Static, Kinematic and Dynamic consts that P2.Body uses were incorrect ( fixes #563 )
2014-03-14 19:20:35 +00:00
photonstorm
901a7f13d1
Updated docs for 2.0 release and updated README.
2014-03-14 06:36:05 +00:00
photonstorm
eb8f021202
Updated README, removed Examples, added Migration Guide.
2014-03-14 06:06:43 +00:00
photonstorm
017a017b96
TilemapLayer.getRayCastTiles will let you get all tiles that hit the given line for further processing.
...
Fixed Tilemap collision. Added new TILE_BIAS const to aid with fast/small sprites.
2014-03-14 02:33:58 +00:00
photonstorm
f678d1fd31
Line now has x, y, width, height, top, bottom, left and right properties, so you can effectively get its bounds.
2014-03-14 00:19:45 +00:00
photonstorm
a83a76bc5d
Line.coordinatesOnLine will return all coordinates on the line using Bresenhams line algorithm.
2014-03-14 00:05:03 +00:00
photonstorm
c8e63582a4
Lots of small tweaks to pass jshint.
2014-03-13 16:49:52 +00:00
photonstorm
94448d2497
P2 postBroadphase example and handler done. Group.enableBodyDebug added. Sprites no longer remove bodies from the world if exists = false, instead they set safeDestroy to true, which removes the body on the next preUpdate, to avoid mid-step destruction issues.
2014-03-13 07:29:23 +00:00
photonstorm
fc788f909c
P2 Body Begin and End Contact events done and working nicely.
2014-03-12 15:26:20 +00:00
photonstorm
d2762719b8
RandomDataGenerator is now started on Game creation instead of boot. You can pass a seed array in the game config object (feature request #547 )
2014-03-12 13:53:30 +00:00
photonstorm
e9ae465272
Sorted out Body gravity settings and updated the example.
2014-03-11 16:26:03 +00:00
photonstorm
6bddf1a914
The main Game class has been modified so that the update methods no longer have any if/else checks in them. Now split into coreUpdate, etc.
...
Put QuadTree back into Debug class.
Debug class now clears down on WebGL.
Updated RetroFont.type.
Fixed QuadTree example.
2014-03-11 16:14:01 +00:00
photonstorm
384451bef7
Particles back in and working again. Also updated most of the examples and put Body.gravity back in as well.
2014-03-11 02:49:55 +00:00
photonstorm
f89da86444
Cache.destroy fixed to clear up properly (thanks Dumtard, #537 )
2014-03-10 19:06:15 +00:00
photonstorm
13ff8985e1
Merged @georgiee p2 BodyDebug and reformatted for jshint pass. Looks awesome :) #536
2014-03-10 15:25:43 +00:00
photonstorm
1fe331956a
Added in p2.total
2014-03-10 14:47:29 +00:00
photonstorm
c4183d200f
Changed the define function calls to use named modules, allows pixi, phaser and p2 to reside in 1 file and still be located by requirejs (thanks brejep, #531 )
2014-03-10 01:39:36 +00:00
photonstorm
45ab4673cc
ScaleManager.fullScreenTarget allows you to change the DOM element that the fullscreen API is called on (feature request #526 )
2014-03-10 01:13:01 +00:00
photonstorm
c73b4eaea0
json is now the default tilemap format when not defined (thanks RyanDansie, #528 )
...
Updated docstrap
2014-03-10 00:50:06 +00:00
photonstorm
4cac6408d8
Ninja.AABB updated with all the correct properties, now works fully as with Circle. Created new tests, all Ninja shapes now set Body.touching values correctly. TileSprites work as bodies. Trying out AABB vs. AABB collision now.
2014-03-07 04:43:55 +00:00
photonstorm
a51ae03246
Tweens are now bound to their own TweenManager, not always the global game one. So you can create your own managers now (for you clark :)
2014-03-07 01:26:09 +00:00
photonstorm
3b2573de9a
Objects that are 'fixedToCamera' are now still correctly placed even if the camera is scaled ( #512 )
2014-03-06 17:12:12 +00:00
photonstorm
7db8e5bc5e
Fixed typo in README (thanks prtksxna, #518 )
2014-03-06 16:56:25 +00:00
photonstorm
081c083176
InputHandler.enableSnap now correctly assigns the snap offset parameters ( fixes #515 )
2014-03-06 16:45:29 +00:00
photonstorm
3e93f24583
New split physics system is implemented. Still tidying-up, but ArcadePhysics, P2 and Ninja Physics are in and configured. Lots more examples required, and tilemap collision mostly broken in Arcade at the moment. Time to implement in Ninja.
2014-03-06 06:29:19 +00:00
photonstorm
22b1ce9b9d
Added Phasers new Physics Manager and restored the pre-1.1.4 ArcadePhysics system. The new manager can handle multiple physics systems running in parallel, which could be extremely useful for lots of games.
2014-03-05 02:36:08 +00:00
photonstorm
5a6ae5f696
Tilemap.putTile now correctly re-calculates the collision data based on the new collideIndexes array ( fixes #371 )
...
Tilemap.putTile can now insert a tile into a null/blank area of the map (before it could only replace existing tiles)
2014-03-04 03:08:35 +00:00
photonstorm
8c2502d37d
Group.xy(index, x, y) allows you to set the x and y coordinates of a Group child at the given index.
...
Group.reverse() reverses the display order of all children in the Group.
New labs demo.
Fixed some Easing docs issues.
2014-03-04 01:27:57 +00:00
photonstorm
67ad898294
Tween.generateData(frameRate) allows you to generate tween data into an array, which can then be used however you wish (see new examples)
...
Added new Retro Font examples.
2014-03-03 22:43:35 +00:00
photonstorm
7183322259
Renamed Phaser.BitmapFont to Phaser.RetroFont because I believe it will cause confusion otherwise. Also tidied up the asset fonts folder.
2014-03-03 17:05:28 +00:00
photonstorm
833960b3c8
Animation.looped has been renamed to Animation.loop. It's a boolean you can toggle at run-time to turn on/off animation looping.
...
A single Animation object now has 3 new events: onStart, onLoop and onComplete.
Animation.loopCount holds the number of times the animation has looped since it last started.
Animation.stop has a new parameter: dispatchComplete. If true it'll dispatch an Animation.onComplete event.
2014-03-03 16:05:55 +00:00
photonstorm
4a370c82cf
You can now load in CSV Tilemaps again and they get created properly ( fixes #391 )
...
You can now create blank Tilemaps and then populate them with data later.
2014-03-03 13:45:47 +00:00
photonstorm
502d74ee39
Keyboard.event now stores the most recent DOM keyboard event.
2014-03-03 11:18:56 +00:00
photonstorm
d8f5832fa2
Completely empty Tilemaps can now be created. This allows for dynamic map generation at runtime.
...
Loads of updates across most the Tilemap files. Not finished yet, still CSV loading to do and a multi-tileset issue to resolve, but it's a lot more flexible now.
2014-03-03 05:19:46 +00:00
photonstorm
6f513042c1
Tween no longer copies all the object properties into the _valuesStart
object on creation.
...
Fixed shadow bug in Debug.text
Fixed tween examples.
2014-03-03 02:40:59 +00:00
photonstorm
c4a68e3e87
The Debug panel now works in WebGL mode. Pay attention to the warning at the top of the Debug docs (feature request #499 )
...
All the Debug methods have had the word 'render' removed from the start. So where you did `debug.renderSpriteInfo` before, it's now just `debug.spriteInfo`.
Debug methods that rendered geometry (Rectangle, Circle, Line, Point) have been merged into the single method: `Debug.geom`.
2014-03-03 00:46:03 +00:00
photonstorm
442e6bb776
Events.onInputUp would be dispatched twice if the Sprite had drag enabled, now only dispatched once (thanks Overbryd, fixes #502 )
...
Changed webfont URI back to //
2014-03-02 11:31:26 +00:00
photonstorm
0eb23d4b11
RandomDataGenerator.integerInRange(min, max) now includes both min
and max
within its range ( #501 )
2014-03-02 11:21:30 +00:00
photonstorm
52118be088
Sound.onMarkerComplete event is now dispatched when a marker stops. See Sound.onLoop for a looping marker event (thanks registered99, fixes #500 )
2014-03-02 11:11:20 +00:00
photonstorm
7ff4e51ab1
Time.reset does a removeAll on any Timers.
...
Device no longer things a Windows Phone or Windows Tablet are desktop devices (thanks wombatbuddy, fixes #506 )
2014-03-02 10:56:39 +00:00
photonstorm
8dcfef8db0
Updated to latest Pixi build (can do away with our own local patch now).
...
Group.sendToBottom(child) is the handy opposite of Group.bringToTop()
Group.moveUp(child) will move a child up the display list, swapping with the child above it.
Group.moveDown(child) will move a child down the display list, swapping with the child below it.
2014-02-28 18:55:07 +00:00
photonstorm
8662cd2fd4
Brand new Grunt task - creates each core library as its own file and a combined phaser.js.
...
New build script now cleanly splits Phaser, Pixi and p2 so they are each UMD wrapped and each available in the global scope (now more requireJS friendly!).
phaser-no-libs.js allows you to use your own version of p2.js or pixi.js with Phaser. Warning: This is totally unsupported. If you hit bugs, you fix them yourself.
Fixed silly instanceof bug in game objects (sorry guys).
2014-02-28 09:30:53 +00:00
photonstorm
8dc28f4800
Animation.speed added. You can now change the animation speed on the fly, without re-starting the animation (feature request #458 )
2014-02-28 04:32:12 +00:00
photonstorm
e3d53ad6a3
Game no longer pauses if you've forced orientation and change it, also doesn't resize a NO_SCALE game.
...
If the game was set to NO_SCALE and you swapped orientation, it would pause and resize, then fail to resize when you swapped back (thanks starnut, fixes #258 )
2014-02-28 04:15:28 +00:00
photonstorm
34ee2b0b20
Fixed issue with CocoonJS detection in Device.
...
Fixed docs issue in Tilemap.
Created landscape pointer test, confirmed working fine (issue #276 )
2014-02-28 03:09:04 +00:00
photonstorm
3568dc4ff1
Pixi GrayFilter ported over (thanks nickryall #404 )
...
Fixed Time.totalElapsedSeconds, which gets the other filters working again too.
2014-02-27 22:35:06 +00:00
photonstorm
10b3dbf74a
Loader.replaceInFileList wouldn't over-write the previous entry correctly, which caused the Loader.image overwrite parameter to fail (thanks basoko, fixes #493 )
2014-02-27 21:41:54 +00:00
photonstorm
7e12075be1
Buttons are now cleanly destroyed if part of a Group without leaving their InputHandler running.
...
You can now safely destroy a Group and the 'destroyChildren' boolean will propogate fully down the display list.
Calling destroy on an already destroyed object would throw a run-time error. Now checked for and aborted.
Calling destroy while in an Input Event callback now works for either the parent Group or the calling object itself.
In Group.destroy the default for 'destroyChildren' was false. It's now `true` as this is a far more likely requirement when destroying a Group.
All GameObjects now have a 'destroyChildren' boolean as a parameter to their destroy method. It's default is true and the value propogates down its children.
2014-02-27 20:05:16 +00:00
photonstorm
53c10ca31f
The grunt task now creates an optional version of Phaser without any Physics support built in. Quite a bit smaller now.
...
The grunt task now has a new `noUmd` option which builds Phaser without the UMD wrapper.
2014-02-27 17:00:14 +00:00
photonstorm
4d284029c7
Tweens now resume correctly if the game pauses (focus loss) while they are paused.
...
Tweens don't double pause if they were already paused and the game pauses.
2014-02-26 23:27:22 +00:00
photonstorm
86374d4437
Phaser.Timer will no longer resume if it was previously paused and the game loses focus and then resumes ( fixes #383 )
...
Phaser.Timer.stop has a new parameter: clearEvents (default true), if true all the events in Timer will be cleared, otherwise they will remain (fixes #383 )
2014-02-26 20:12:17 +00:00
photonstorm
db090601b8
The Timer will no longer create negative ticks during game boot, no matter how small the Timer delay is ( fixes #366 )
2014-02-26 19:52:23 +00:00
photonstorm
d0fa50f014
Fixed issue stopping SoundManager.volume from working correctly on a global volume basis (fix # 488)
2014-02-26 14:40:55 +00:00
photonstorm
5ab104ad4b
Loader.script now has callback (and callbackContext) parameters, so you can specify a function to run once the JS has been injected into the body.
2014-02-26 02:45:06 +00:00
photonstorm
1aea08d0f7
AnimationParser.spriteSheet wasn't taking the margin or spacing into account when calculating the numbers of sprites per row/column, nor was it allowing for extra power-of-two padding at the end ( fix #482 , thanks yig)
...
AnimationManager.add documentation said that 'frames' could be null, but the code couldn't handle this so it defaults to an empty array if none given (thanks yig)
Also updated TypeScript definitions and StateManager.add docs.
2014-02-26 01:32:38 +00:00
photonstorm
29fcfc515d
Fixed TilemapParser - would spit out a tileset warning if margin/spacing were set ( fix #485 , thanks Cybolic)
2014-02-26 01:20:24 +00:00
photonstorm
db2e3733c2
Fullscreen mode now uses window.outerWidth/Height when using EXACT_FIT as the scale mode, which fixes input coordinate errors ( fixes #232 )
...
Fullscreen mode now works in Internet Explorer and uses the new fullscreen non-prefix call.
2014-02-25 21:16:56 +00:00
photonstorm
741249043c
ScaleManager has 2 new events: ScaleManager.enterFullScreen and ScaleManager.leaveFullScreen, so you can respond to fullscreen changes directly.
...
Fullscreen mode now uses window.outerWidth/Height when using EXACT_FIT as the scale mode, which fixes input coordinate errors (fixes #232 )
2014-02-25 17:10:37 +00:00
photonstorm
13c99f3491
Phaser.StageScaleMode has been renamed to ScaleManager and moved from the system folder to the core folder. It's still available under game.scale.
...
If your game references the old Phaser.StageScaleMode consts like SHOW_ALL you need to update them to Phaser.ScaleManager, i.e. Phaser.ScaleManager.SHOW_ALL.
All of the Project Templates have been updated to reflect the above change.
2014-02-25 14:46:48 +00:00
photonstorm
b4dbaf9950
StateManager.start can now have as many parameters as you like. The order is: start(key, clearWorld, clearCache, ...) - they are passed to State.init() (NOT create!)
2014-02-25 11:56:57 +00:00
photonstorm
a1b502fc06
Stage.smoothed allows you to set if sprites will be smoothed when rendered. Set to false if you're using pixel art in your game. Default is true. Works in Canvas and WebGL. Setting the game anti-aliased parameter now works properly too.
...
Sprite.smoothed and Image.smoothed allows you to set per-Sprite smoothing, perfect if you just want to keep a few sprites smoothed (or not).
Fixes #381 .
2014-02-25 04:41:57 +00:00
photonstorm
b255fea85f
Time.advancedTiming is a new boolean property. If true Time.fps, fpsMin, fpsMax, frames, msMin and msMax will be calculated, otherwise they remain at their defaults.
2014-02-25 04:05:28 +00:00
photonstorm
8fb2f20482
Swapping between tabs will pause and resume tweens correctly, allowing their onComplete events to still fire ( fixes #292 )
2014-02-25 03:33:47 +00:00
photonstorm
cc06a62b90
Pausing the game will now mute audio and resuming will un-mute, unless it was muted via the game ( fixes #439 )
2014-02-25 03:12:12 +00:00
photonstorm
415342d986
Vastly improved visibility API support + pageshow/pagehide + focus/blur. Working across Chrome, IE, Firefox, iOS, Android (also fixes #161 )
2014-02-25 02:59:24 +00:00
photonstorm
beaac18b8f
Active animations now monitor if the game pauses, and resume normally when the game un-pauses ( fixes #179 )
2014-02-24 23:06:45 +00:00
photonstorm
36df5516dd
Fixed full-screen anti-alias issue ( #478 ).
2014-02-24 20:33:22 +00:00
photonstorm
d9cadc70ac
The Keyboard class has had a complete overhaul. Phaser.Key objects are created automatically, there are fixes against duration and keys reset properly on visibility loss.
...
Keyboard.removeKey has been removed. The way the new keyboard manager works means it's no longer required.
Fixes issue #462
2014-02-24 15:58:02 +00:00
photonstorm
46e85c8394
Updated version to 2.0.0 (fixes npm install issue #476 )
2014-02-24 12:00:28 +00:00