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
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
photonstorm
e088d5c67f
Documentation fix.
2014-02-24 00:35:11 +00:00
Richard Davey
94133e4c11
Updated Sound.play loop check
2014-02-22 03:05:41 +00:00
photonstorm
be4d42a1c2
The StateManager now looks for a function called 'resumed' which is called when a game un-pauses ( fixes #358 )
2014-02-22 00:01:19 +00:00
photonstorm
57796a60be
TileSprites can now receive full Input events, dragging, etc and be positioned in-world and fixed to cameras ( fixes #321 )
2014-02-21 19:21:00 +00:00
photonstorm
1448562abd
Loader can now load JSON files specifically (game.load.json) and they are parsed and stored in the Game.Cache. Retrieve with game.cache.getJSON(key) ( #329 )
...
Also fixed UTF encoding on the animation file.
2014-02-21 18:48:06 +00:00
photonstorm
fb5920feec
We now force IE11 into Canvas mode to avoid a Pixi bug with pre-multiplied alpha. Will remove once that is fixed, sorry, but it's better than no game at all, right? :(
...
Loader.setPreloadSprite() will now set sprite.visible = true once the crop has been applied. Should help avoid issues (#430 ) on super-slow connections.
2014-02-21 17:29:51 +00:00
photonstorm
5a00a0ad97
TilemapParser will now throw a warning if the tileset image isn't the right size for the tile dimensions ( fixes #377 )
2014-02-21 16:57:45 +00:00
photonstorm
5c4dd26d25
Fixed for renderSpriteInfo.
2014-02-21 15:50:02 +00:00
photonstorm
7ee0c20bb3
Added Debug.renderSpriteBounds() back and wrapped Body.velocity and force in px2p calls.
2014-02-21 15:34:15 +00:00
photonstorm
d7ababa398
BitmapData.alphaMask will draw the given image onto a BitmapData using an image as an alpha mask.
2014-02-21 15:09:04 +00:00
photonstorm
066a625d17
When adding a Group if the parent value is null
the Group won't be added to the World, so you can add it when ready. If parent is undefined
it's added to World by default.
2014-02-21 12:35:30 +00:00
photonstorm
cf3796d60c
Phaser.Animation.frame now returns the frame of the current animation, rather than the global frame from the sprite sheet / atlas ( fix #466 )
2014-02-21 10:31:17 +00:00
photonstorm
d057a9fe11
Device, Canvas and GamePad classes all updated for better CocoonJS support (thanks Videlais)
2014-02-19 02:45:42 +00:00
photonstorm
14646e811c
QuadTree deprecated and moved to plugins. Body.collideWorldBounds added back and working. CollisionGroups pretty much finished.
2014-02-19 02:12:27 +00:00
photonstorm
5d5c64d22f
Tilemap.createCollisionObjects will parse Tiled data for objectgroups and convert polyline instances into physics objects you can collide with in the world.
...
After defining tiles that collide on a Tilemap, you need to call Tilemap.generateCollisionData(layer) to populate the physics world with the data required.
Debug.renderPhysicsBody updated to take camera location and body rotation into account.
Body movement functions put back to velocity :)
Updated to latest dev version of pixi and latest p2.js
Updated docs
2014-02-18 03:01:51 +00:00
photonstorm
3a59c13a71
Added hostname: '*' to the grunt-connect in Gruntfile.js ( fixes #426 )
2014-02-15 19:03:43 +00:00
photonstorm
e5e643b103
fixedToCamera now works across all display objects. When enabled it will fix at its current x/y coordinate, but can be changed via cameraOffset.
...
fixedToCamrea now works for Groups as well :) You can fix a Group to the camera and it will influence its children.
Also fixed the issue with World.preUpdate/postUpdate not being called and various small documentation issues.
2014-02-15 01:27:42 +00:00
photonstorm
e5a4620b87
Loader.physics now lets you load Lime + Corona JSON Physics data, which can be used with Body.loadPolygon and Body.loadData.
...
Cache.addPhysicsData and Cache.getPhysicsData allow you to store parsed JSON physics data in the cache, for sharing between Bodies.
2014-02-14 23:51:49 +00:00
photonstorm
1b5837d71d
World preUpdate, update and postUpdate have all been moved to Stage. So all children are updated regardless where on the display list they live. Fixes #419
2014-02-14 17:29:31 +00:00
photonstorm
539a0f2256
BitmapFont fixes and updates and Cache support for it added. Working sweet now.
2014-02-14 16:38:06 +00:00
photonstorm
15b83e1c88
Added the new BitmapFont class. This is for rendering retro style fixed-width bitmap fonts into an Image object.
2014-02-14 06:04:29 +00:00
photonstorm
b38b00c2c1
Loader.bitmapFont now has 2 extra parameters: xSpacing and ySpacing. These allow you to add extra spacing to each letter or line of the font.
2014-02-14 04:34:57 +00:00
photonstorm
f9a4beb608
Text update.
2014-02-14 00:15:36 +00:00
photonstorm
87fce63a23
Updated.
2014-02-13 23:47:25 +00:00
photonstorm
30fbbec675
BitmapData.addTo removed and enhanced BitmapData.add so it can accept either a single Sprite/Image or an Array of them.
...
BitmapData has had all of the EaselJS functions removed. It was just taking up space and you can do it all via BitmapData.context directly.
Camera following now working again.
2014-02-13 14:19:41 +00:00
photonstorm
e9fb8f6389
Updates across the board moving Stage.canvas to Game.canvas
2014-02-13 12:55:58 +00:00
photonstorm
0786e86ee5
Stage.scale has been moved to Game.scale. The same game scaling properties exist as before, but now accessed via Game.scale instead.
...
Stage.aspectRatio has been moved to StageScaleMode.sourceAspectRatio (so now game.scale.sourceAspectRatio)
Stage.scaleMode has been moved to StageScaleMode.scaleMode (so now game.scale.scaleMode)
Stage.fullScreenScaleMode has been moved to StageScaleMode.fullScreenScaleMode (so now game.scale.fullScreenScaleMode)
Stage.canvas has been removed. It was only ever an alias for Game.canvas anyway, so access it via that instead.
2014-02-13 12:50:10 +00:00
photonstorm
175584469a
Updated README. Previous commit fixes #406 .
2014-02-13 12:28:13 +00:00
photonstorm
b85f40df12
Phaser.Stage now extends PIXI.Stage, rather than containing a _stage object.
...
(Warning: currently breaks camera based code and pointers, as the scale property is removed).
2014-02-12 23:12:36 +00:00
photonstorm
ab5c07dfe8
Updated to Pixi 1.5 final.
...
InputHandler.pixelPerfectOver - performs a pixel perfect check to see if any pointer is over the current object (warning: very expensive!)
InputHandler.pixelPerfectClick - performs a pixel perfect check but only when the pointer touches/clicks on the current object.
2014-02-12 01:25:36 +00:00
photonstorm
da878b2181
Updated the Gruntfile. Also:
...
InputHandler.pixelPerfectOver - performs a pixel perfect check to see if any pointer is over the current object (warning: very expensive!)
InputHandler.pixelPerfectClick - performs a pixel perfect check but only when the pointer touches/clicks on the current object.
Previously using a Pixel Perfect check didn't work if the Sprite was rotated or had a non-zero anchor point, now works under all conditions + atlas frames.
2014-02-11 13:23:54 +00:00
photonstorm
d26bda2736
Small textual changes.
2014-02-10 02:32:56 +00:00
photonstorm
d2366d5fa5
Fix for issue #376 - IE11 didn't populate the Device.ieVersion value. Now extracted from Trident revision, but still use Device.trident instead for IE11+ checks.
2014-02-10 02:23:45 +00:00
photonstorm
ae74cb02dd
Fixes #382 Error when using InputHandler#onInputUp & sprite destroys itself during the event.
2014-02-10 02:14:59 +00:00
photonstorm
0294a4735d
Fixes issues reported in #389
2014-02-10 01:49:58 +00:00
photonstorm
d44775c095
Phaser.Ellipse added. A fully compatible port of the PIXI.Ellipse class, can be used in Sprite/Image hitArea tests.
...
Phaser.Polygon added. A fully compatible port of the PIXI.Polygon class, can be used in Sprite/Image hitArea tests.
2014-02-10 01:37:50 +00:00
photonstorm
e15bebd269
Text.lineSpacing allows you to control the spacing between each line that is rendered.
...
Text.inputEnabled allows you to enable all input events over Text objects: dragging, clicking, etc - anything that works on a Sprite works on Text now too.
2014-02-09 22:48:35 +00:00
photonstorm
bca64c2adb
Huge update to Phaser.Text. Much more lean, but loads of great new options added including drop shadows, gradient fills, fonts with spaces in the name, etc.
2014-02-09 13:36:02 +00:00
photonstorm
e8b432f518
Fixed bug where changing State would cause the camera to not reset if it was following an object.
...
World.reset now calls Camera.reset which sends the camera back to 0,0 and un-follows any object it may have been tracking.
2014-02-08 13:45:18 +00:00
photonstorm
ee3f6d8e7f
Tilemap had the wrong @method signatures so most were missing from the docs.
2014-02-08 07:24:40 +00:00
photonstorm
c429787877
Button now extends Phaser.Image not Phaser.Sprite, all the same functionality as before remains, just no animations or physics body.
2014-02-07 18:55:29 +00:00
photonstorm
dd43d59cce
InputManager.getLocalPosition(displayObject, pointer, output) will return the local coordinates of the specified displayObject and pointer.
...
InputManager.hitTest will test for pointer hits against a Sprite/Image, its hitArea (if set) or any of its children.
2014-02-07 18:01:58 +00:00
photonstorm
bc3a3fd43d
You can now use the hitArea property on Sprites and Image objects. hitArea can be a geometry object (Rectangle, Circle, Polygon, Ellipse) and is used in pointerOver checks.
2014-02-07 17:14:10 +00:00
photonstorm
d583b364bd
Game.add.renderTexture now has the addToCache parameter. If set the texture will be stored in Game.Cache and can be retrieved with Cache.getTexture(key).
...
Game.add.bitmapData now has the addToCache parameter. If set the texture will be stored in Game.Cache and can be retrieved with Cache.getBitmapData(key).
2014-02-07 06:25:28 +00:00
photonstorm
3cae06d1ad
Phaser.AnimationParser now sets the trimmed data directly for Pixi Texture frames. Tested across JSON Hash, JSON Data, Sprite Sheet and XML.
2014-02-07 00:57:41 +00:00
photonstorm
6cabb03a82
Sprite.crop() now takes a Phaser.Rectangle instead of explicit parameters.
...
Phaser.Image is a brand new display object perfect for logos, backgrounds, etc. You can scale, rotate, tint and blend and Image, but it has no animation, physics body or input events.
Previously if you used Sprite.crop() it would crop all Sprites using the same base image. It now takes a local copy of the texture data and crops just that.
2014-02-06 23:13:39 +00:00
photonstorm
7ba1196c0d
Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy)
2014-02-06 22:42:35 +00:00
photonstorm
3748811d11
Testing new Image object.
2014-02-06 19:34:05 +00:00
photonstorm
4ed20e0f77
Removed all intances of Sprite.group from Group and replaced with the already existing parent property.
2014-02-06 13:15:45 +00:00
photonstorm
4cfce8b4d2
Group now extends PIXI.DisplayObjectContainer, rather than owning a _container property, which makes life a whole lot easier re: nesting.
2014-02-06 02:31:36 +00:00
photonstorm
9737710200
Upgraded to Pixi.js 1.4.4
2014-02-06 00:19:46 +00:00
photonstorm
68d5c73fea
Explicitly paused Timer continues if you un-focus and focus the browser window.
...
Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception.
2014-02-05 22:35:35 +00:00
photonstorm
eddce653e9
Preparing for 1.1.5 development.
2014-02-05 21:02:41 +00:00
photonstorm
e7a9b96d27
Final release 1.1.4 examples finished.
2014-02-05 16:55:02 +00:00
photonstorm
02b75b9e23
Updated doc files.
2014-02-05 16:55:02 +00:00
photonstorm
0896c2fac7
Updating copyright year and README.
2014-02-05 16:54:59 +00:00
photonstorm
84f0f00f49
n-way collision checks and onBeginContact and onEndContact done and working. Also fixed issue in TweenManager.removeAll.
2014-02-05 16:54:58 +00:00
photonstorm
3488880956
Sprite vs. Sprite Group Body Tests.
2014-02-03 04:09:45 +00:00
photonstorm
5e182d317b
Fixed lots of examples and added the missing Line.js.
2014-01-31 14:12:20 +00:00
photonstorm
27fc447928
New polygon collision object examples and Body scale fixes.
2014-01-31 10:34:18 +00:00
photonstorm
45b6d5a741
Removed: Debug.renderSpriteTouching, Debug.renderLocalTransformInfo, Debug.renderWorldTransformInfo, Debug.renderSpriteCollision and Debug.dumpLinkedList.
...
Debug.renderPhysicsBody(body, color) is extremely useful for debugging the new physics bodies. Will draw the outline + points in the color given.
Debug.renderBodyInfo(sprite, x, y, color) will display lots of Sprite body data.
2014-01-31 05:42:20 +00:00
photonstorm
13a86765cb
Phaser.CANVAS_PX_ROUND is a boolean. If 'true' the Canvas renderer will Math.floor() all coordinates before drawImage, stopping pixel interpolation. Defaults to false.
...
Phaser.CANVAS_CLEAR_RECT is a boolean. If 'true' (the default) it will context.clearRect() every frame. If false this is skipped (useful if you know you don't need it)
Collision now works between Sprites positioned via sprite.x/y, sprite.body.x/y or sprite.body.velocity.
If you are tweening a sprite and still want physics collision, set `sprite.body.moves = false` otherwise it will fight against the tween motion.
2014-01-31 04:14:02 +00:00
photonstorm
651858372c
Added Game core loop stepping support. Super-useful for debugging, and helped me track down the issue with jittery physics collision. Double-win!
2014-01-29 17:10:13 +00:00
photonstorm
d51a37211c
Phaser.Line added to the group of geometry classes, with full point on line/segment and intersection tests (see new examples)
2014-01-29 00:21:28 +00:00
photonstorm
9deb5514a2
ArcadePhysics.setBoundsToWorld implemented. Body.setCircle, setRectangle and setPolygon all working. Tidying up Body class. Need to add tile collision special case handler next.
2014-01-28 05:01:17 +00:00
photonstorm
90c09374af
Velocity integration tidied up. Now moving to sync Body with Sprite center point.
2014-01-28 01:29:35 +00:00
photonstorm
fbe508ab1b
Direct assignment of Body values, allows for sloped ground walking.
2014-01-27 17:08:20 +00:00
photonstorm
dbdb2a2026
Adjusted delta timer cap and fixed some typos and more examples.
2014-01-27 17:08:20 +00:00
photonstorm
4505aa50f6
Integrated SAT. Fixed lots of examples. Fixed documentation. Added new examples and built new phaser.js file for testing.
2014-01-27 06:29:26 +00:00
photonstorm
ea9e22f472
SAT implemented and working nicely at long last :)
2014-01-23 21:45:35 +00:00
photonstorm
b2c49ef853
Merging previous changes back in again.
2014-01-22 14:31:18 +00:00
photonstorm
7a0e9a478c
New Math functions added.
2014-01-22 10:54:49 +00:00
photonstorm
128c7143d5
Lots more physics tests and updates.
...
PLEASE DO NOT upgrade to this release if you need your game working and it uses any of the physics functions, as they're nearly all broken here.
Just pushing up so I can share it with someone.
2014-01-20 20:14:34 +00:00
photonstorm
abdaaa0010
Tidied up the docs and removed some Body vars no longer needed. Now to attempt stacking.
2014-01-15 14:40:25 +00:00
photonstorm
32f5a2fa36
More examples updates. Fixed Starstruck tilemap code, removed un-needed ArcadePhysics methods and rebuilt the js files for testing.
2014-01-14 03:33:03 +00:00
photonstorm
011d2d8e05
The way the collision process callback works has changed significantly and now works as originally intended.
...
The World level quadtree is no longer created, they are now built and ripped down each time you collide a Group, this helps collision accuracy.
Bodies are no longer added to a world quadtree, so have had all of their quadtree properties removed such as skipQuadtree, quadTreeIndex, etc.
QuadTree.populate - you can pass it a Group and it'll automatically insert all of the children ready for inspection.
Removed ArcadePhysics binding to the QuadTree, so it can now be used independantly of the physics system.
2014-01-14 02:43:09 +00:00
photonstorm
71f82477ea
Tidying up all of the map files, sorting out Tiled paths and updated the tilemap examples for 1.1.4.
2014-01-13 19:45:15 +00:00
photonstorm
c6fa2cb7b6
Added the new Timer, TimerEvent and Time methods to the TypeScript definitions files.
2014-01-13 14:18:15 +00:00
photonstorm
754219a978
Fixed some documentation typos.
2014-01-09 01:23:23 +00:00
photonstorm
c6c579e6b3
Phaser.Timer is now feature complete and fully documented. You can create Phaser.TimerEvents on a Timer and lots of new examples have been provided.
2014-01-09 00:59:37 +00:00
photonstorm
35e61172e1
Device.quirksMode is a boolean that informs you if the page is in strict (false) or quirks (true) mode.
...
Canvas.getOffset now runs a strict/quirks check and uses document.documentElement when calculating scrollTop and scrollLeft to avoid Chrome console warnings.
The Time class now has three new methods: addEvent, repeatEvent and loopEvent. See the new Timer examples to show how to use them.
2014-01-08 11:21:48 +00:00
photonstorm
67e2caafbc
Added new Contributors guide.
2014-01-08 11:21:48 +00:00
photonstorm
bd9b964710
Added a new Full Screen Mobile template example.
2014-01-08 00:34:47 +00:00
photonstorm
428e331a11
Groups can now be added to other Groups as children via group.add() and group.addAt().
...
Groups now have an 'alive' property, which can be useful when iterating through child groups with functions like forEachAlive.
2014-01-06 01:39:23 +00:00
photonstorm
7aa45b5872
Added BitDeli badge, also updating Timer class.
2014-01-03 12:43:58 +00:00
photonstorm
5526a7322b
Warning: This version has a new ArcadePhysics handler in it. Don't upgrade if you need this for live game code, wait until we go to master. Otherwise, this commit contains lots of new physics demos and a new updateMotion and Body class to try and fix, once and for all, the physics issues with applied forces.
2014-01-02 23:28:22 +00:00
photonstorm
902ffee808
Loader.progressFloat contains the actual non-rounded progress value, where-as Loader.progress contains a rounded value. Use progressFloat if you've > 100 files to load.
2013-12-31 17:35:40 +00:00
photonstorm
d1cd1df9a5
Lots of fixes and updates to the Button class, InputHandler for snap offsets, Sound looping and Stage scaling.
2013-12-31 17:03:09 +00:00
photonstorm
86f6ddcbc8
Two new particle examples and a group animation example. Also fixed CocoonJS sound issue and Cache sound locked bug.
2013-12-31 03:37:11 +00:00
photonstorm
3b87ce9fc9
Brand new Gamepad API support fully implemented (thanks to Karl Macklin), with examples to show use.
2013-12-31 01:45:30 +00:00
photonstorm
ba74bea4b4
New Group.destroy example and patched the desyrel font xml.
2013-12-30 21:36:50 +00:00
photonstorm
ce4cf531d4
Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source.
2013-12-30 16:54:00 +00:00
photonstorm
fdbdd81b7b
Updated some docs, added the new renderHidden parameter for Canvas and updated the RenderTexture examples as a result.
2013-12-27 00:26:21 +00:00
Richard Davey
923a10ee81
Input no longer sets cursor to default if already set to none
2013-12-26 00:52:01 +00:00
photonstorm
167a498a5e
Phaser.Game constructor can now be passed a single object containing game settings + Stage settings, useful for advanced configurations.
2013-12-24 03:18:55 +00:00
photonstorm
0acef49a7c
RenderTexture now displays correctly in Canvas games.
...
Stage.display property added. A direct reference to the root Pixi Stage object (very useful for RenderTexture manipulation)
2013-12-23 04:20:09 +00:00
photonstorm
bf72b4d3b0
Tilemap.createFromObjects can now turn a bunch of Tiled objects into Sprites in one single call, and copies across all properties as well.
2013-12-22 04:27:12 +00:00
photonstorm
63d90a0176
Sprites that are fixedToCamera can now be input dragged regardless of world position.
2013-12-22 03:46:08 +00:00
photonstorm
3cbb820349
You can now load any binary file via the Loader: game.load.binary(key, url, callback) - the optional callback allows for post-load processing before entering the Cache.
2013-12-20 18:27:36 +00:00
photonstorm
5cf7ed4fdb
More TypeScript updates.
2013-12-18 16:56:14 +00:00
photonstorm
f991f9cee8
Tweens have a new event: onLoop.
...
Tweens - Example showing how to use the tween events, onStart, onLoop and onComplete.
Lots of documentation fixes in the Tween class.
Tweens fire an onLoop event if they are set to repeat. onComplete is now only fired for the final repeat (or never if the repeat is infinite)
Tween.onStart is now called when the tween starts AFTER the delay value, if given (thanks stevenbouma)
2013-12-18 13:02:01 +00:00
photonstorm
b2c680811b
New unified Tiled loader.
2013-12-18 13:02:01 +00:00
photonstorm
50eee95c99
Improved TilemapLayer rendering and debug rendering significantly. Cleared out some old assets and added a new map.
2013-12-18 00:44:04 +00:00
photonstorm
dd7ae12271
ArcadePhysics.overlap and collide now recognise TileSprites in the collision checks.
2013-12-17 16:48:03 +00:00
photonstorm
896e9af9f5
TilemapLayers now render tiles correctly, with our without debugging overlay. Collision working well across single and index ranges.
2013-12-17 05:07:00 +00:00
photonstorm
7917eac255
Added Matching Pairs game and updated fixed to camera example.
2013-12-16 15:16:44 +00:00
photonstorm
03ae324d26
New user submitted examples
2013-12-13 23:56:39 +00:00
photonstorm
a361a18616
Updated IE11 check, forces IE11 to use Canvas renderer even in AUTO mode.
2013-12-13 14:04:14 +00:00
photonstorm
da5d8c9272
Updated p2.js to latest build.
2013-12-11 03:20:33 +00:00
photonstorm
669570c701
Tidying up the examples and more Tilemap work.
2013-12-10 12:23:42 +00:00
photonstorm
af5847e8e4
Tilemap and game core loop updates.
2013-12-09 16:40:48 +00:00
photonstorm
1f513a333e
Fixed an issue where passing null as the Group parent wouldn't set it to game.world as it should have (thanks tito100).
...
Continued work on the tilemap collision - again, please don't use this version if you need working tilemaps.
2013-12-06 01:07:25 +00:00
photonstorm
cd314cd03e
Group.length now returns the number of children in the Group regardless of their exists/alive state, or 0 if the Group is has no children.
2013-12-05 09:14:49 +00:00
photonstorm
c5c754725a
* When a Sprite is destroyed any active filters are removed as well.
...
* Updated Pixi.js so that removing filters now works correctly without breaking the display list.
2013-12-04 22:39:53 +00:00
photonstorm
42c0bed502
Fixed World.scale and Group.scale.
2013-12-03 02:13:57 +00:00
photonstorm
0256117307
Preparing dev branch for 1.1.4
2013-11-29 19:40:28 +00:00
photonstorm
d9ffd6afd4
Final version of the Getting Started guide.
2013-11-29 18:28:55 +00:00
photonstorm
00a9897ae2
Updated Filter resolution to a 2f and added Blur and Marble filters.
2013-11-29 12:26:53 +00:00
photonstorm
f22159e257
Updated documentation.
2013-11-28 15:57:09 +00:00
photonstorm
780b8a5d6d
New filters and demos: LightBeams, Fire and Tunnel. Also Loader can now load script files.
2013-11-28 05:43:35 +00:00
photonstorm
a9a46bfbbf
Lots of documentation updates and new Loader examples.
2013-11-27 16:33:49 +00:00
photonstorm
2fc5c89c1e
Preparing to extend the Loader to handle script loading.
2013-11-26 17:14:21 +00:00
photonstorm
141337bed9
Heavily optimised PixiShader.
2013-11-26 05:13:56 +00:00
photonstorm
299115ca5d
The entire Phaser library has been updated to match the new JSHint configuration.
2013-11-25 04:40:04 +00:00
photonstorm
13a2cc2feb
Updating all files to adhere to the JSHint settings and fixing lots of documentation errors on the way.
2013-11-25 03:13:04 +00:00
photonstorm
a876fdd2b6
README update, Loader audio path fix and Tween.isRunning fix.
2013-11-24 13:16:55 +00:00
photonstorm
d30e2974c4
Updated JSHint configuration, README and started working through source files against JSHint.
2013-11-24 12:51:20 +00:00
Richard Davey
16ae7f3cb7
Merge pull request #225 from kevinthompson/kt/jshint
...
Add JSHint configuration.
2013-11-24 04:29:33 -08:00
photonstorm
155c863d69
New Timer class and scale event updates.
2013-11-24 11:04:58 +00:00
Kevin Thompson
82f019d4d2
Add JSHint configuration.
2013-11-23 09:08:23 -08:00
photonstorm
496639ff25
Added Phaser.Filter and started moving the shaders over into their own filter classes, so they won't all get bundled in unless needed.
2013-11-21 05:00:07 +00:00
photonstorm
e620c99479
ShaderToy convertor up and working, lots of shaders being turned into Pixi filters :)
2013-11-20 02:28:28 +00:00
photonstorm
b63bd14172
ScaleMode fix, BitmapData change and Device updates.
2013-11-18 20:27:40 +00:00
photonstorm
7ad4164e3a
Expanding BitmapData
2013-11-17 04:33:16 +00:00
photonstorm
38bd00b4ed
ArcadePhysics.separateTile wasn't returning the value, so the custom process callback wasn't getting called (thanks flameiguana)
2013-11-16 13:47:12 +00:00
photonstorm
83cacb93a0
More updates to BitmapData.
2013-11-15 20:40:55 +00:00
Richard Davey
ebe441666c
BitmapData object added
2013-11-13 20:57:09 +00:00
Richard Davey
6a24d6116b
Lots of renderTexture updates and examples added
2013-11-13 06:49:24 +00:00
photonstorm
46cf024a35
filter test updates
2013-11-09 02:16:52 +00:00
photonstorm
3f99b691c9
Added in a Group.sort demo, also updated the documentation and build files.
2013-11-07 06:10:15 +00:00
photonstorm
42cd8bd812
Added Group.sort, can sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :)
2013-11-07 04:31:37 +00:00
photonstorm
dfb22f1044
Tracked down an evil bug in Group.swap that caused the linked list to get corrupted in an upward (B to A) neighbour swap.
2013-11-06 16:46:21 +00:00
photonstorm
8b793cd8d7
Updated to latest version of Pixi.js. Lovely new WebGL filters now working happily :)
2013-11-06 04:51:23 +00:00
photonstorm
94d9fa6e77
Tidying up some docs.
2013-11-05 21:44:39 +00:00
photonstorm
1eca16a948
ArcadePhysics.updateMotion applies the dt to the velocity calculations as well as position now (thanks jcs)
2013-11-05 16:14:24 +00:00
photonstorm
2e576fa9a7
Input Handler updates, orientation screen and World visibility
2013-11-04 20:44:32 +00:00
photonstorm
19ddad8095
Mouse handler updates.
2013-11-04 20:44:32 +00:00
Richard Davey
c1d60d7e19
getAnimation and RAF callback ID checks added
2013-11-04 00:04:19 +00:00
photonstorm
cc42a71c66
Preparing 1.1.3 dev branch
2013-11-01 19:05:47 +00:00
photonstorm
3e9777e6f4
Updated docs for 1.1.2 release.
2013-11-01 18:16:52 +00:00
photonstorm
160a321a36
Updated invaders demo.
2013-11-01 17:37:32 +00:00
photonstorm
685054eac5
Group.callAll now supports nested functions and a context, making it really powerful!
2013-11-01 17:29:57 +00:00
photonstorm
581d637663
Added Group.cursor. This points to the first item added to a Group. You can move the cursor with Group.next() and Group.previous().
2013-11-01 02:50:00 +00:00
photonstorm
3c164b466c
* Updated: event.preventDefault() has been added to all Mouse event handlers.
...
* Updated: Sprite.deltaX/Y removed due to non-use. prevX/Y values moved to Sprite._cache.prevX/Y.
* Updated: Due to missing extends parameter the Sprite prototype was picking up functions from classes it never meant to (Button, TilemapLayer), now fully isolated.
2013-11-01 02:07:21 +00:00
photonstorm
01eab3aeb1
Fixed issue 141 - If a Sprite is dragged and you release the Pointer while not over the Sprite, it will think it's still over it (thanks Paratron)
2013-10-31 16:27:10 +00:00
photonstorm
6f93a2ec94
Multiple Anims update, Tilemap fixes and some new examples.
2013-10-31 15:45:19 +00:00
photonstorm
712858cf75
More work on the Invaders game.
2013-10-31 05:31:54 +00:00
photonstorm
ddf15979d0
Fixing up Invaders and Star Struck. Also removing lots of un-used css jsdoc themes.
2013-10-31 01:45:16 +00:00
photonstorm
24c809dd5f
Final body / physics / bounds fixes. Also updated various examples, optimised Sprite core loop and enhanced the Invaders example.
2013-10-30 03:46:52 +00:00
photonstorm
3de62907a0
Nearly fixed the tilemap / body issue. More tests needed but then can push to master.
2013-10-29 04:07:26 +00:00
photonstorm
7ceb11ae49
New: You'll now find a complete Basic project Template in the resources/Project Templates folder. Will add more complex ones soon.
2013-10-28 23:29:34 +00:00
photonstorm
a814cc26cc
* Fixed issue 135 - Added typeof checks into most ArcadePhysics functions to avoid errors with zero values.
...
* Fixed issue 136 - distanceTo using worldX/Y instead of x/y.
2013-10-28 10:17:36 +00:00
photonstorm
ea651113df
Preparing for 1.1.2 release.
2013-10-28 00:16:20 +00:00
photonstorm
9261160571
1.1.1 release with fix for Phaser.AUTO and a new text example.
2013-10-26 19:14:13 +01:00
photonstorm
2787ed188e
Preparing for 1.1.2 release
2013-10-26 12:17:22 +01:00
photonstorm
bd5bca14fe
Small url update.
2013-10-25 18:38:01 +01:00
photonstorm
34736fbde5
Final 1.1 release. Here goes nothing :)
2013-10-25 18:35:49 +01:00
photonstorm
65d2bf557b
Updated docs and more tidying up.
2013-10-25 17:30:37 +01:00
photonstorm
2659ed7a4a
Updated readme.
2013-10-25 06:01:36 +01:00
photonstorm
2921a6de2e
Pixel Perfect click detection now works even if the Sprite is part of a texture atlas.
2013-10-25 05:40:46 +01:00
photonstorm
1f28d328a7
Commit before refactoring Sprite guts.
2013-10-24 21:21:00 +01:00
photonstorm
a6fac64248
Loads of issues reported on Github resolved (sprite crop, music resume, etc).
2013-10-24 04:27:28 +01:00
photonstorm
7e5f38d022
Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas.
2013-10-23 17:11:06 +01:00
photonstorm
4a51ac4671
Updated README and sorting out folder case issue.
2013-10-23 13:30:23 +01:00
photonstorm
f1f42e4d41
New Examples area finished, README updated. Getting closer to 1.1 release.
2013-10-23 04:15:44 +01:00
photonstorm
77fd15bf3c
Preparing new static examples viewer.
2013-10-22 14:59:43 +01:00
photonstorm
8ed783802e
New examples page
2013-10-18 15:12:32 +01:00
photonstorm
7e8b79adf4
Tilemap painting example and other smaller updates.
2013-10-17 21:10:00 +01:00
photonstorm
275fa4641e
Added Text.destroy and BitmapText.destroy.
2013-10-17 15:40:44 +01:00
photonstorm
a97f271de7
Fixed Animation index 0 issue and hooked TilemapLayer to camera.
2013-10-16 02:09:12 +01:00
photonstorm
c6bf67c392
Group.alpha exposed and instance returns added to Loader functions.
2013-10-13 20:28:06 +01:00
photonstorm
e98aa205ea
Sprite.destroy is back in business.
2013-10-13 01:29:57 +01:00
photonstorm
574f4f351b
Github Issue #101 fixed. Plus more Tilemap updates.
2013-10-11 20:02:12 +01:00
photonstorm
b868c2cb1b
Started revamp of the Tilemap system. Also removed old 'Advanced Physics' and dropped in p2.js which is what I hope we'll eventually use.
2013-10-11 04:42:11 +01:00
photonstorm
a7230aa769
Sprite.loadTexture added.
2013-10-10 09:03:38 +01:00
photonstorm
f10f9324ad
Animation.killOnComplete added and fixed a few issues in the Tanks game.
2013-10-09 13:36:57 +01:00
photonstorm
29acf7fb4b
Enemy tanks, now firing.
2013-10-09 07:11:36 +01:00
photonstorm
ca9321ef42
Updated physics body to use localTransform. Updated tanks demo.
2013-10-09 05:13:38 +01:00
photonstorm
83a00862be
Lots of new examples and updates.
2013-10-09 04:31:08 +01:00
Richard Davey
1c577d3674
Fixed RandomDataGenerator.sow
2013-10-08 22:55:27 +01:00
photonstorm
f5584bdfe5
Lots of fixes and updates to ArcadePhysics and Group, plus more examples.
2013-10-08 21:09:46 +01:00
photonstorm
ebc4e5dc3d
New examples HTML page added.
2013-10-08 12:52:20 +01:00
photonstorm
c307f79102
Added Sprite.fixedToCamera, fixed Angular Velocity and Acceleration, fixed jittery Camera, added skipQuadTree flag and created lots more examples.
2013-10-08 00:58:20 +01:00
photonstorm
1bc6ac25fa
Preparing to merge new examples.
2013-10-07 22:15:28 +01:00
Richard Davey
664c512a99
Fixed small typo.
2013-10-06 16:27:39 +01:00
Richard Davey
47e1b1b54b
Sprite optimisations.
2013-10-04 19:00:55 +01:00
Richard Davey
c00bf96603
World and Camera updates nearly complete.
2013-10-04 16:51:24 +01:00
Richard Davey
e8bed83ac3
Making some major changes to Camera and World.
2013-10-04 14:41:15 +01:00
Richard Davey
54f073e5cb
Testing some new Camera tricks.
2013-10-03 23:20:24 +01:00
Richard Davey
96da57cac0
Fixed up the namespace in the documentation and finished off all sections other than Game Objects and Physics (yuck).
2013-10-03 02:38:35 +01:00
Richard Davey
e85643abf4
Yet more documentation done.
2013-10-02 20:18:24 +01:00
Richard Davey
6ce6330f50
More docs.
2013-10-02 11:22:48 +01:00
Richard Davey
9b4b267e7a
Working through building the docs.
2013-10-01 16:15:45 +01:00
Richard Davey
fa15f8015d
Fixed bug in LinkedList#remove that could cause first to point to a dead node
2013-10-01 11:28:57 +01:00
Richard Davey
480d90b009
* Removed the callbackContext parameter from Group.callAll because it's no longer needed.
...
* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child.
* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg)
2013-10-01 02:19:08 +01:00
Richard Davey
8668b82ef6
* Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski)
...
* Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use.
2013-10-01 01:18:29 +01:00
Richard Davey
16b1913de1
* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead.
...
* Button.setFrames will set the current frame based on the button state immediately.
* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call.
* Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas.
* When the game boots it will now by default disable user-select and touch action events on the game canvas.
* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox.
2013-09-30 17:12:22 +01:00
Richard Davey
8d17e1f963
Sound duration fixes.
2013-09-30 12:17:21 +01:00
Richard Davey
e846f3cbac
Fix for incorrect new particle positioning (issue #73 )
2013-09-30 12:17:21 +01:00
Richard Davey
31bbf05ace
* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly.
...
* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue.
* Change: When you swap State all active tweens are now purged.
2013-09-30 11:15:50 +01:00
Richard Davey
497d15b5bc
Sprite.play
2013-09-27 13:47:22 +01:00
Richard Davey
18c695e9dd
PixiPatch and other 1.0.7 features
2013-09-27 09:57:08 +01:00
Richard Davey
6353d8c7ab
Fixed some eases.
2013-09-26 15:22:49 +01:00
Richard Davey
891369b197
Preparing for 1.0.6 release, but moving physics changes to dev.
2013-09-24 15:28:29 +01:00
Richard Davey
51049128f5
Collision fixes for testing
2013-09-23 22:23:17 +01:00
Richard Davey
257cbe3be8
Much more stable collision, just need to refactor the Tilemap handling - see if I can optimise it a bit too.
2013-09-23 03:26:08 +01:00
Richard Davey
093bf8343d
Graphics fixes and other changes
2013-09-22 22:55:34 +01:00
Richard Davey
d1ea96fd83
Input updates
2013-09-21 13:07:06 +01:00
Richard Davey
a415e779d1
Final 1.0.5 release.
2013-09-20 13:55:33 +01:00
Richard Davey
9e88da5c66
Multiple animation fixes in place.
2013-09-19 23:47:50 +01:00
Richard Davey
3f1cafe21f
Put the famous idnetityMatrix typo back in so it doesn't break Pixi
2013-09-19 13:33:51 +01:00
Richard Davey
c5fc5e3394
Fixed various issues in the TweenManager, added length property to Group and improved the build script.
2013-09-19 04:45:08 +01:00
Richard Davey
cf26f68693
Added Math.numberArray
2013-09-18 14:08:26 +01:00
Richard Davey
47834ad478
Fixed issue in FrameData.getFrameIndexes where the input array was being ignored.
2013-09-18 14:02:31 +01:00
Richard Davey
d9a49797c4
1.0.4 release
2013-09-18 06:34:56 +01:00
Richard Davey
a102859622
Added some links to the readme.
2013-09-17 16:59:04 +01:00
Richard Davey
a899d24d4c
Small readme update
2013-09-17 16:54:46 +01:00
Richard Davey
3c5ea01e09
1.0.3 release - fixed Text and Bitmap Fonts, Animation documentation and more examples
2013-09-17 16:50:47 +01:00
Richard Davey
17e208a95e
1.0.2 build
2013-09-16 01:53:53 +01:00
Richard Davey
e3869ff3ac
* Fixed a bug in the AnimationManager where useNumericIndex was always set to true
...
* Added in lots of Particle examples
* Added in the start of a Breakout game
* Added in the start of a Platformer game
2013-09-16 01:52:15 +01:00
Richard Davey
e705509d29
Added lots of particles examples.
2013-09-16 01:08:06 +01:00
Richard Davey
8c9a7c8bc7
Adding more examples in.
2013-09-15 20:45:00 +01:00
Richard Davey
f069107e55
1.0.1 release - fixes issues in tile map collision, additional Animation stop checks and updated package license.
2013-09-15 03:58:38 +01:00
Richard Davey
49a6ba2c02
Updated Group to fix some issues with not checking children
2013-09-15 00:14:45 +01:00
Richard Davey
ad0d32b7aa
Formatting updates.
2013-09-13 16:42:33 +01:00
Richard Davey
505e808318
Updated README.
2013-09-13 16:34:11 +01:00
Richard Davey
f664a4971b
Tidying up for 1.0 release push to master.
2013-09-13 16:16:48 +01:00
Richard Davey
09def364c3
Farewell TypeScript, see you on the other side.
2013-08-28 07:02:57 +01:00
Richard Davey
ecf61fc80c
Updated Game.switchState to accept state objects and fixed the OrientationScreen.
2013-08-25 09:59:23 +01:00
Richard Davey
619b8415ed
Reverting back to the only version of TypeScript that really works :(
2013-08-13 04:22:24 +01:00
Richard Davey
0b1bcaf270
Set the default camera to direct itself to the Stage.
2013-08-09 18:44:45 +01:00
Richard Davey
8b2f1cca51
Various small fixes
2013-08-09 17:02:47 +01:00
Richard Davey
9bf7d070f5
Added in the JS source files for doc generation and the definitions to csproj XML script.
2013-08-09 03:12:33 +01:00
Richard Davey
1248a6c06e
Whole codebase updated to TypeScript 0.9.1, phew!
2013-08-08 19:16:47 +01:00
Richard Davey
73745e5720
Fixed a few things in Tilemap and optimised the renderer a little bit.
2013-08-08 06:29:21 +01:00
Richard Davey
48f6d850c8
Fixed bug where a Tween with both yoyo and loop enabled would get out of sync.
2013-08-08 06:08:53 +01:00
Richard Davey
ab7e55ef27
Added ability for the TimeManager to monitor the pause duration. This is then applied to tweens and other game services, meaning the tweens now restart properly after a pause resumes.
2013-08-08 05:43:22 +01:00
Richard Davey
5768336150
Tidied up the Loader so it now starts automatically, added required Signals and removed the old-style callbacks.
2013-08-08 04:35:13 +01:00
Richard Davey
04dcb29c88
WorldView now takes camera placement into account, so Buttons now work across multiple camera set-ups.
2013-08-08 03:24:26 +01:00
Richard Davey
a174bbc6b3
Vastly optimised InputManager and Pointer is now aware of which camera it is over.
2013-08-08 03:05:59 +01:00
Richard Davey
bc77c3f84e
Updated Renderer system, now much easier to expand and maintain.
2013-08-08 01:07:22 +01:00
Richard Davey
d7205992a5
Fixed some issues in dragging sprites with snap-to-center and world coordinates.
2013-08-07 00:00:12 +01:00
Richard Davey
77cc3858d9
Fixed the world drag issue across Sprite and Button.
2013-08-06 04:34:52 +01:00
Richard Davey
a7873a3b74
Removed the FX project as it's no longer needed and tidied up the build folder.
2013-08-06 03:43:53 +01:00
Richard Davey
11954812c6
Clearing down the To Do list.
2013-08-06 03:14:48 +01:00
Richard Davey
d1da4cbdef
Fixed Firefox audio issue with the Loader and added defined functions for anonymous callbacks
2013-08-05 03:43:20 +01:00
Richard Davey
982faeedb8
Updating and fixing tests
2013-08-02 18:32:26 +01:00
Richard Davey
955909979d
Preparing for 1.0 branch
2013-08-01 22:21:29 +01:00
Richard Davey
4f2c26df77
Fixed issue with Pointer speed not resetting and moved some more render methods to the Debug class.
2013-07-29 00:43:10 +01:00
Richard Davey
3038f6fcf8
Added optimised point in circle test to CircleUtils
2013-07-27 10:57:54 +01:00
Richard Davey
3c123293ba
New CSS3 Filters component and Net class.
2013-07-19 04:57:14 +01:00
Richard Davey
9827e7522f
Multiple fixes to remove the use of reserved words, making the YUI compressor work again.
2013-07-19 02:59:23 +01:00
Richard Davey
72eb22128f
SoundManager overhaul nearly finished. Proper Web Audio / Audio tag split, working across desktop and mobile. Includes iOS touch unlock restriction handling, auto decoding, global volume management, audio sprite support (for both web audio and audio tags) and playhead monitoring.
2013-07-16 14:45:08 +01:00
Richard Davey
d0e886259d
Getting ready to overhaul the sound manager.
2013-07-15 21:45:26 +01:00
Richard Davey
b3fff37faf
Added todo items to repo
2013-07-13 12:38:59 +01:00
Richard Davey
dcce99ec60
Added the new Button game object and various other input and tilemap fixes.
2013-07-12 03:28:46 +01:00
Richard Davey
c81cf0c882
Lots of Tilemap updates, moved the renderer out, added components and new tests.
2013-07-02 23:41:25 +01:00
Richard Davey
d19ad4976d
Merged Advanced Physics with core.
2013-06-26 05:44:56 +01:00
Richard Davey
0591c7f2bd
Doing one final commit before the task of merging physics with core.
2013-06-25 15:35:45 +01:00
Richard Davey
0a7513240a
Refactor completed. Now to tie the physics and sprites together.
2013-06-14 18:54:12 +01:00
Richard Davey
038cb213e8
Starting merge of the Advanced Physics classes and splitting off Flixel physics into ArcadePhysics.
2013-06-13 17:15:16 +01:00
Richard Davey
7dac2b6506
Added Group.bringToTop and updated Input component to use sprite getXY handler.
2013-06-13 01:55:32 +01:00
Richard Davey
2389c6c231
Added ability to detect if a given point is within a sprite or not, taking rotation and scaling into account.
2013-06-12 19:53:48 +01:00
Richard Davey
c5f6817c4c
Working sprite bounds / vertices regardless of scale or rotation
2013-06-11 21:30:15 +01:00
Richard Davey
a30762ed8c
Fixed world drag support and other input modifications.
2013-06-07 07:35:28 +01:00
Richard Davey
730594835a
New Texture and Transform components which are now used by Sprite, Group and Camera.
2013-06-06 02:47:08 +01:00
Richard Davey
2f03f5fc43
Updated Loader component and fixed a few Pointer issues.
2013-06-05 02:58:16 +01:00
Richard Davey
d42f396ba0
Lots of tweaks and fixes to the orientation and fullscreen classes
2013-06-05 01:49:08 +01:00
Richard Davey
82d4ba4538
Re-done the pointer handler so it respects the top-most rendered sprite in priority to anything below it, for both mouse over and click events.
2013-06-03 12:03:34 +01:00
Richard Davey
1c37cd1a96
Created DebugUtils class and started moving renderInfo methods to it.
2013-06-03 03:08:24 +01:00
Richard Davey
2de70d07a5
Fixed issue in Camera.inCamera check where it wouldn't take into consideration the Sprites scrollFactor.
2013-06-03 02:38:08 +01:00
Richard Davey
2270da2479
Fixed drag sprite + offsets and center locking
2013-06-02 21:41:00 +01:00
Richard Davey
f9f17ad353
Multi point input handler working
2013-06-02 14:19:12 +01:00
Richard Davey
49fe5ee65f
Added Group IDs and references to Sprites, Group sorting, z-index values and child swapping. Also added all of the drag and bounds methods to Input.
2013-06-02 03:47:54 +01:00
Richard Davey
5b532ab2e4
Sprite.Input component added and working nicely.
2013-06-01 02:49:41 +01:00
Richard Davey
b20a6ff85a
Working my way through putting all the Tests back in and fixing issues as I go.
2013-06-01 01:30:36 +01:00
Richard Davey
31c4d8cb14
Adding in missing tests and fixing as we go
2013-05-31 19:28:16 +01:00
Richard Davey
fe372af453
Commit before tidying up redundant files
2013-05-31 15:13:03 +01:00
Richard Davey
f2054f8a2a
Physics shape offset now finally working
2013-05-30 03:54:51 +01:00
Richard Davey
f3c9049e76
Camera updates, scrollFix check and some new pictures and tests.
2013-05-29 17:31:57 +01:00
Richard Davey
7b4374cabf
Added loop and yoyo properties to Tweens
2013-05-29 15:45:34 +01:00
Richard Davey
b1d836dfaf
Scale tweaks
2013-05-29 12:24:25 +01:00
Richard Davey
09f57fa346
Preparing new tests
2013-05-29 02:58:56 +01:00
Richard Davey
3c0c349089
More refactoring for 1.0.0
2013-05-28 21:38:37 +01:00
Richard Davey
94add2ea6e
Updated Loader so it no longer checks if the animation data is valid, passes that control to the AnimationLoader. Also fixed camera bounds check in Sprite.
2013-05-23 15:45:04 +01:00
Richard Davey
c7485301ca
Added Starling/Sparrow XML Texture Atlas format support.
2013-05-23 03:08:57 +01:00
Richard Davey
bd54460e80
Added the GameObjectManager
2013-05-23 00:01:58 +01:00
Richard Davey
e2141c91a6
Added VerletManager and lots of new tests
2013-05-21 04:12:54 +01:00
Richard Davey
0b2d818ba8
CollisionMask up and running
2013-05-20 06:21:12 +01:00
Richard Davey
05cc32fbc9
Added final logo and start of CollisionMask
2013-05-19 14:01:11 +01:00
Richard Davey
53aa43566e
Updated DynamicTexture.setPixel, added GameMath.shuffleArray, fixed Animation.frame and created a few new tests
2013-05-18 03:05:28 +01:00
Richard Davey
55568592b5
Lots of updates across input, rendering and grouping
2013-05-17 06:49:43 +01:00
Richard Davey
a6e8436e6d
Massive input overhaul continued
2013-05-16 21:34:24 +01:00
Richard Davey
3cdd2baff0
New Input handler implemented.
2013-05-16 02:36:58 +01:00
Richard Davey
ce7bfd1fc2
Added FullScreen API support and fixed numerous StageScaleMode issues.
2013-05-14 03:37:38 +01:00
Richard Davey
b5b5a99dce
Preparing for 0.9.6 work
2013-05-02 20:54:28 +01:00
Richard Davey
be982b4322
Updated readme and new minified build
2013-05-02 14:03:41 +01:00
Richard Davey
493380a51e
Updated readme for official release.
2013-05-02 05:20:01 +01:00
Richard Davey
0a08e1ae0e
Removed un-needed file and added SoundManager fix.
2013-05-02 05:16:16 +01:00
Richard Davey
e39073d07b
Updated readme
2013-05-02 05:02:05 +01:00
Richard Davey
54a5e6477c
Lots of new tile map commands and tests.
2013-05-02 05:01:34 +01:00
Richard Davey
2a5b6ef12a
Large Tilemap collision overhaul. Proper callback support, optimised collision checks and lots more.
2013-05-02 03:37:45 +01:00
Richard Davey
e62b300a25
Added Camera Mirror FX and test case.
2013-05-02 01:02:06 +01:00
Richard Davey
7d98a1bb9d
New FXManager system and Camera FX now in place.
2013-05-01 04:10:21 +01:00
Richard Davey
c5cccf3283
Large refactoring of the pause and boot screens in Stage and various other small fixes
2013-04-29 02:41:19 +01:00
Richard Davey
b6f8a3fba6
Final 0.9.4 release
2013-04-28 22:10:11 +01:00
Richard Davey
cb9cb6e894
Github Bug Fixes
2013-04-28 22:04:37 +01:00
Richard Davey
e948f1e3be
Fixed daft issue in Camera and fully implemented tilemap collision.
2013-04-28 22:04:36 +01:00
Richard Davey
b8ab13fec8
Getting tilemap collision up and running
2013-04-25 01:55:56 +01:00
Richard Davey
33882ae5d1
Small readme update.
2013-04-24 02:57:49 +01:00
Richard Davey
3898faf17e
New v0.9.3 release - see the changelog in the README for full details.
2013-04-24 02:48:03 +01:00
Richard Davey
1b6fbc1324
Fixed Game.boot issue and Animation issue reported in github.
2013-04-24 00:47:11 +01:00
Richard Davey
6466361f5f
Great new thrust ship example added for ScrollZones. Also added rotationOffset value to GameObject base class.
2013-04-23 21:27:45 +01:00
Richard Davey
f2678104fa
Saving first iteration of the ScrollZone game object.
2013-04-22 01:53:24 +01:00
Richard Davey
2638e598dc
Added Stage.disablePauseScreen
2013-04-20 03:50:21 +01:00
Richard Davey
361b8e5779
Version 0.9.2 update. See the change log for full details.
2013-04-20 03:40:17 +01:00
Richard Davey
1217bf4722
Version 0.9.1 release - see the release notes for more details.
2013-04-19 18:57:19 +01:00
Richard Davey
b0bf25c818
Formatting
2013-04-18 16:53:55 +01:00
Richard Davey
6bb4c5e3fc
Preparing for new release
2013-04-18 14:16:18 +01:00
Richard Davey
72a4809dd8
Updated readme
2013-04-15 22:16:17 +01:00
Richard Davey
25a59b97b4
V0.8 - added DynamicTexture support and 2 examples, plus animation frame names and removed a few bugs.
2013-04-15 22:13:11 +01:00
Richard Davey
f4bf6c607f
Added in frameName support for animations and easy setting of sprites born from a texture atlas (all for you Jesse!)
2013-04-15 15:42:13 +01:00
Richard Davey
ebf83609ae
Version 0.7 release. StageScaleMode support added and world input values exposed.
2013-04-14 02:31:00 +01:00
Richard Davey
1464b6e163
Updated readme.
2013-04-13 04:28:52 +01:00
Richard Davey
92cf118a06
Updated links
2013-04-12 20:05:53 +01:00
Richard Davey
a2283e0e78
Added screen shots
2013-04-12 17:46:19 +01:00
Richard Davey
b592ca9f05
Added screen shots
2013-04-12 17:38:44 +01:00
Richard Davey
204935d997
Updated readme
2013-04-12 17:25:18 +01:00
Richard Davey
a1a1ab3f30
First push to github
2013-04-12 17:19:56 +01:00
Richard Davey
5c705c4b31
Initial commit
2013-04-12 05:27:51 -07:00