Commit graph

4992 commits

Author SHA1 Message Date
Richard Davey
8d1b670df1 Merge remote-tracking branch 'origin/webgl-tilemap' into dev 2016-07-18 23:00:35 +01:00
Richard Davey
b2c0b3d014 Merge pull request #2641 from calvindavis/dev
Fixed optional alpha parameter in interpolateColor.
2016-07-18 18:22:15 +01:00
Richard Davey
e62257fbed Merge pull request #2640 from Amyantis/physicsGroup_definition_fix
Fix definition of GameObjectFactory.physicsGroup
2016-07-18 18:21:46 +01:00
Calvin Davis
c2d596997c Fixed optional alpha parameter in interpolateColor. 2016-07-18 17:21:02 +01:00
Pete Baron
48ea3ec8e0 Final notes and 'blank tilemap' example source showing constant scaling of layer 1. (There aren't any examples of map scaling). 2016-07-18 13:35:31 +12:00
Pete Baron
e3f402ec06 Clean-up and comments. 2016-07-18 13:28:20 +12:00
Pete Baron
550954210e Clean-up and comments. 2016-07-18 13:24:29 +12:00
Pete Baron
9daf6d0525 Clean-up and comments. 2016-07-18 13:19:15 +12:00
Pete Baron
5f6ea15c58 Clean-up and comments. 2016-07-18 13:09:43 +12:00
Pete Baron
263238ba42 Comments and clean-up. 2016-07-18 12:56:34 +12:00
Pete Baron
83b73f6a77 Update progress. 2016-07-18 12:44:22 +12:00
Pete Baron
fdb80f1a55 Modify Tile Shader to produce scaled layers that look identical to the Canvas renderer scaling (add uCentreOffset, scale the drawing coordinates, subtract uCentreOffset). 2016-07-18 12:43:59 +12:00
Pete Baron
0b392e19a2 Remove unused precalculated u/v scale factor. 2016-07-18 12:41:32 +12:00
Pete Baron
e87fc84527 comment - Tile.scale is currently unused 2016-07-18 12:40:08 +12:00
Richard Davey
b405570833 Docs fix #2624 2016-07-17 11:26:09 +01:00
Richard Davey
6f9bcae23e Docs fixes #2629 2016-07-17 11:23:41 +01:00
Richard Davey
0765e9eaa6 Merge pull request #2634 from greeny/hotfix-bitmapdata-fluent
BitmapData.js: fixed fluent interface
2016-07-17 11:20:40 +01:00
Richard Davey
776c148a93 Fixed jshint errors. 2016-07-16 08:04:56 +01:00
Richard Davey
8d914bece8 Fixed TS defs for weapon.fire. 2016-07-16 07:56:16 +01:00
Tomáš Blatný
2b90f2cb3b BitmapData.js: fixed fluent interface 2016-07-15 20:16:35 +02:00
Richard Davey
8c99f97c5f Exclude paths for now. 2016-07-13 03:16:34 +01:00
Richard Davey
a01f59d82d Added Path Manager Plugin. 2016-07-13 03:08:03 +01:00
Richard Davey
4548d70369 Experimenting with new MainLoop + position interpolation. (reverted from commit e49d45e278) 2016-07-13 02:44:35 +01:00
Amyantis
8b386dbbb1 Fix definition of GameObjectFactory.physicsGroup
Making physicsBodyType optionnal according to http://phaser.io/docs/2.6.1/Phaser.GameObjectFactory.html#physicsGroup
2016-07-12 14:13:57 +02:00
Richard Davey
e49d45e278 Experimenting with new MainLoop + position interpolation. 2016-07-12 03:05:29 +01:00
Richard Davey
265501b4af The src/system folder has been removed and all files relocated to the src/utils folder. This doesn't change anything from an API point of view, but did change the grunt build scripts slightly. 2016-07-11 22:38:09 +01:00
photonstorm
9b4bb1bdd8 Group.getRandomExists will return a random child from the Group that has exists set to true.
Group.getAll will return all children in the Group, or a section of the Group, with the optional ability to test if the child has a property matching the given value or not.

Group.iterate has a new `returnType`: `RETURN_ALL`. This allows you to return all children that pass the iteration test in an array.
2016-07-11 17:05:42 +01:00
photonstorm
1467eb48cf A Group with inputEnableChildren set would re-start the Input Handler on a Sprite, even if that handler had been disabled previously. 2016-07-11 14:17:51 +01:00
photonstorm
94498fcd32 The InputHandler.flagged property has been removed. It was never used internally, or exposed via the API, so was just overhead. 2016-07-11 14:17:41 +01:00
photonstorm
9aef9b741c Preparing for 2.6.2 dev. 2016-07-11 10:30:09 +01:00
photonstorm
f2daaec98c Merge remote-tracking branch 'origin/dev' 2016-07-11 10:12:11 +01:00
photonstorm
1572a5313a README update. 2016-07-11 10:11:09 +01:00
photonstorm
ac2516f5aa 2.6.1 Release. 2016-07-11 10:07:56 +01:00
Richard Davey
cfb2b813ef Fixed Uncaught TypeError: Cannot set property 'x' of undefined in Body.js (thanks @ErwanErwan #2607) 2016-07-08 18:54:00 +01:00
photonstorm
aaa9f0d61a Preparing for 2.6.1 dev. 2016-07-08 16:18:59 +01:00
photonstorm
0abb2cf4cd Updated release files. 2016-07-08 15:54:49 +01:00
photonstorm
ce93363d8d Updated version number. 2016-07-08 15:49:47 +01:00
photonstorm
8e03fbd5a5 Merge remote-tracking branch 'origin/dev' 2016-07-08 15:48:19 +01:00
photonstorm
fced3f86ec Phaser 2.6.0 Release. 2016-07-08 15:46:26 +01:00
photonstorm
8a8fa0297d Preparing for release. 2016-07-08 14:26:31 +01:00
photonstorm
61ce14f332 P2.World.clear will now clear out the World.walls property, resetting all of the wall bounds to null. This allows the walls to be re-created accurately when the P2 World is reset, which happens on a State change or restart (thanks @ewpolly1 @codermua #2574) 2016-07-08 13:02:58 +01:00
photonstorm
521a6c9dbb Sound.stop will check to see if gainNode exists before trying to disconnect from it. 2016-07-08 12:27:12 +01:00
photonstorm
c34c7bae4e Docs updates. 2016-07-08 12:04:28 +01:00
photonstorm
dfd9203e0a onWorldBounds now sends the bounds it collided with. 2016-07-08 11:28:45 +01:00
photonstorm
ee202667ed Huge docs update for all of the Game Object events. 2016-07-08 11:28:30 +01:00
Richard Davey
0014201917 Groups now have the following properties, which are getters and setters: centerX, centerY, left, right, top and bottom. These calculate the bounds of the Group, based on all visible children, and then allow you to apply positioning based on that. This means you can, for example, now get the horizontal center of a Group by called Group.centerX. These properties are also setters, so you can position the Groups, and it will take scale and rotation into consideration.
Groups have a new method `alignIn`. It allows you to align the Group within another Game Object, or a Rectangle. You can specify one of 9 positions which are the new position constants such as: `Phaser.TOP_LEFT` or `Phaser.CENTER` (see docs for the complete list). The Groups are positioned based on their child bounds, which takes rotation and scaling into consideration. You can easily place Groups into the corners of the screen, or game world, or align them within other Sprites, using this method.

Groups have a new method `alignTo`. It allows you to align a Group to the side of another Game Object, or a Rectangle. You can specify one of 11 positions which are the new position constants such as: `Phaser.TOP_LEFT` or `Phaser.LEFT_BOTTOM` (see docs for the complete list). The Groups are positioned based on their child bounds, which takes rotation and scaling into consideration. You can easily align Groups next to other Sprites using this method.
2016-07-08 01:33:42 +01:00
Richard Davey
410237881e PIXI.DisplayObjectContainer calls updateTransform at the start of getBounds to help avoid the bounds being out of date. 2016-07-08 01:06:25 +01:00
Richard Davey
c0ba439e82 ArcadePhysics.Body.onCollide is a new Signal that is dispatched whenever the Body collides with another Body. Due to the potentially high volume of signals this could create it is disabled by default. To use this feature set this property to a Phaser.Signal: sprite.body.onCollide = new Phaser.Signal() and it will be called when a collision happens, passing two arguments: the sprites which collided.
ArcadePhysics.Body.onOverlap is a new Signal that is dispatched whenever the Body overlaps with another Body. Due to the potentially high volume of signals this could create it is disabled by default. To use this feature set this property to a Phaser.Signal: `sprite.body.onOverlap = new Phaser.Signal()` and it will be called when an overlap happens, passing two arguments: the sprites which collided.
2016-07-07 23:16:18 +01:00
Richard Davey
6ba3c9401f ArcadePhysics.Body.setCircle is a new method that allows you to define an Arcade Physics Body as being a circle instead of a rectangle. You can control the radius of the body and the offset from the parent sprite.
ArcadePhysics.World.separateCircle is a new method that handles all circular body collisions internally within Arcade Physics (thanks @VitaZheltyakov)

All of the Arcade Physics internal methods, such as `collideGroupVsSelf`, `collideSpriteVsSprite` and so on, have been updated to work with circular body shapes (thanks @VitaZheltyakov)

ArcadePhysics.Body.onWorldBounds is a new Signal that is dispatched whenever the Body collides with the world bounds, something that was previously difficult to detect. Due to the potentially high volume of signals this could create it is disabled by default. To use this feature set this property to a Phaser.Signal: `sprite.body.onWorldBounds = new Phaser.Signal()` and it will be called when a collision happens, passing one argument: the sprite on which it occurred.
2016-07-07 21:58:39 +01:00
photonstorm
261155a683 Merged the arcade-circles branch back into 2.6 and tidied up lots of the source code. Needs checking as not working properly with rect vs. circle, but fine with circle vs. circle. 2016-07-07 16:45:10 +01:00