Commit graph

1404 commits

Author SHA1 Message Date
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
Richard Davey
511b2f017a Merge pull request #597 from Cryszon/patch-1
Added support for radians in wrapAngle
2014-03-18 15:13:32 +00:00
Kimmo Salmela
97a838edbb Added support for radians in wrapAngle
My first time proposing a change in GitHub, so I hope I did it correctly.
2014-03-18 13:40:07 +02: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
89cdaef84d New build files. 2014-03-18 00:01:39 +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
f32dce8cdd New build files. 2014-03-17 21:18:02 +00:00
photonstorm
08aa381238 p2 object re-created on system start. 2014-03-17 21:16:59 +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
Richard Davey
67919af33c Merge pull request #591 from clark-stevenson/patch-1
Basic p2 added
2014-03-17 16:12:12 +00:00
photonstorm
bc8b2424ce Removed the examples build script from the Gruntfile (fix #592) 2014-03-17 16:10:19 +00:00
photonstorm
30a04985f7 Working through blank tilemap fix. 2014-03-17 16:10:19 +00:00
clark-stevenson
868f128978 Basic p2 added
Will maybe be sketchy (a few Any's - p2.Shape or p2.Constraint etc). Also I may have messed up a couple of types (Phaser.Physics.p2.Body vs p2.Body).

Also fixed #585
2014-03-17 12:35:14 +00:00
Richard Davey
ccffcbdc9a Merge pull request #584 from clark-stevenson/patch-2
Ninja Physics Added
2014-03-17 10:30:36 +00:00
clark-stevenson
1152fe6ee2 Ninja Physics Added 2014-03-16 15:21:22 +00:00
Richard Davey
e8b08cbdcc Merge pull request #581 from dreadhorse/destroy
Add destroy methods to Ninja Body, AABB and Circle
2014-03-16 12:42:41 +00:00
Stefan Holmgren
e3480ffd3c Add destroy methods to Ninja Body, AABB and Circle
The Sprite.destroy() method calls the Body’s destroy() method if a body
exists. If using Ninja physics, destroying a Sprite will not work,
since the destroy method wasn’t implemented in Ninja’s Body.

Also added destroy() methods to Ninja’s AABB and Circle. Tile already
have a destroy() method.
2014-03-16 12:14:46 +01: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
Richard Davey
227810ee01 Merge pull request #571 from dreadhorse/dev
Ninja world collision to check right and bottom bounds
2014-03-16 00:41:51 +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
Stefan Holmgren
51102797ed Ninja world collision to check right and bottom bounds
The world collision algorithm need to check the right and bottom of the
bounds in case the bound’s x or y are not equal to 0
2014-03-15 06:19:26 +01: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
1746afe477 Merged 1.2 branch into master for the final Phaser v2.0.0 release. 2014-03-14 06:43:52 +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
44a5741148 Fixed games. Updated Body.moves handling. 2014-03-14 04:49:55 +00:00
photonstorm
0e29bd4300 Tile Collision Callbacks working properly. CSV / Blank map examples added. Multiple tilesets per map working again. That's it folks! 2014-03-14 04:21:56 +00:00
photonstorm
f3ff9c197f Fixed all the tilemap examples. 2014-03-14 03:26:06 +00:00
photonstorm
d2506dd0f3 New tilemap ray casting example + bounce. Also fixed sci-fly example. 2014-03-14 02:42:56 +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
ec0b22268d Added Body.tilePadding to help with small/fast moving bodies vs. tile collision. 2014-03-13 23:15:32 +00:00
photonstorm
5297497632 Tilemap collision finally getting closer. 2014-03-13 22:49:08 +00:00
photonstorm
e955145707 Added p2 kill and reset test + nearing completion on tilemap collision. 2014-03-13 21:14:18 +00:00
Richard Davey
31d2d392a6 Merge pull request #557 from alvinsight/1.2
Examples ready to be released !
2014-03-13 20:44:50 +00:00
alvinsight
726c42310a Yeaah, 242 examples working, only 7 missing 2014-03-13 17:32:55 +00:00
alvinsight
8a4d5ab8fd Updated all the examples that were using the old physicsEnabled 2014-03-13 17:32:54 +00:00
photonstorm
c8e63582a4 Lots of small tweaks to pass jshint. 2014-03-13 16:49:52 +00:00
photonstorm
c2d38fe16b jshint passed all the p2 physics and fixed Debug.spriteBounds. 2014-03-13 16:16:14 +00:00