Commit graph

216 commits

Author SHA1 Message Date
photonstorm
4910f27a88 You can now over-ride the pxm and mpx functions with your own via the physics config object. 2014-03-12 00:12:26 +00:00
photonstorm
cb5a8c7515 Renamed px2p and p2px to: pxm and mpx (px to meters and meters to px). Also removed from Math. 2014-03-12 00:07:27 +00:00
photonstorm
e9ae465272 Sorted out Body gravity settings and updated the example. 2014-03-11 16:26:03 +00:00
photonstorm
58887d9bc6 Moved all of the Tilemap to P2 body methods into P2 itself (makes more sense this way) and tidied them up. 2014-03-11 15:02:59 +00:00
photonstorm
d2d77f37dd Finished Ninja Physics updates. 2014-03-11 14:21:20 +00:00
photonstorm
170776ada1 rnd updated so the array picks use length -1 (fixes #541) 2014-03-11 10:56:54 +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
f321cab77e The physics configuration object can now be used to start physics systems specifically. 2014-03-11 01:23:41 +00:00
photonstorm
a6467f9b60 Fixed Arcade, Ninja and P2 enable methods. Modified core Physics enable. Added world enable test. 2014-03-11 01:11:08 +00:00
photonstorm
53797171a3 Fixed Group.sort. Added z-depth property to all core game objects. Fixed P2 const overwrite. 2014-03-10 23:01:10 +00:00
photonstorm
b4cb281f1c Renamed Phaser.Physics.P2 const to Phaser.Physics.P2JS to avoid issue #540 2014-03-10 22:15:03 +00:00
photonstorm
13ff8985e1 Merged @georgiee p2 BodyDebug and reformatted for jshint pass. Looks awesome :) #536 2014-03-10 15:25:43 +00:00
Richard Davey
751af10c52 Merge pull request #536 from georgiee/debug-draw-p2
Debug draw p2
2014-03-10 14:50:01 +00:00
photonstorm
1fe331956a Added in p2.total 2014-03-10 14:47:29 +00:00
photonstorm
9f997daa46 Lots of examples fixes and put Group.sort back in. 2014-03-10 14:33:18 +00:00
Georgios Kaleadis
569770ed21 update 2014-03-10 14:28:44 +01:00
Georgios Kaleadis
95e2081f3a more p2 fixes 2014-03-10 13:17:37 +01:00
Georgios Kaleadis
c611d51751 minimal runable new p2 integration 2014-03-10 13:15:05 +01:00
photonstorm
8fff38618d Tidied up the Examples, fixed Arcade Physics Body, added Body enable support to Group and fixed QuadTree. 2014-03-10 03:06:28 +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
4db1fc0079 Restored Phaser.QuadTree - should get all remaining Arcade Physics examples working again. 2014-03-07 15:14:53 +00:00
photonstorm
480c1819d6 Working through AABB vs. AABB tests. 2014-03-07 05:30:56 +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
6815c5909a New tiles and new map test. 2014-03-06 09:48:42 +00:00
photonstorm
e97a207816 Added in Circle to the Ninja physics system. 2014-03-06 07:18:59 +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
2bab4fd2fb Testing lines. 2014-03-05 04:40:37 +00:00
photonstorm
12a2a2ec16 Testing map collision 2014-03-05 03:18:24 +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
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
Richard Davey
3794a846d4 Merge pull request #504 from georgiee/fix-single-polygon
Phaser.Physics.Body#loadPolygon
2014-03-02 11:26:31 +00:00
photonstorm
66bdf56349 The physics world is now cleared on state swap (fixes #505) 2014-03-02 11:04:04 +00:00
Georgios Kaleadis
a1bb3ea23b pop first element if there is only one shape 2014-03-01 12:04:30 +01:00
photonstorm
4562939e4e Fixed stupid error in destroy(). 2014-02-28 06:17:18 +00:00
photonstorm
e45a929b00 Body.loadPolygon now parses all shapes that may exist in a JSON data file, and re-creates them all on the Body. Assumes shapes are CCW + Convex (tested working with Lime Exportor). Almost fixes #449 but Body rotation seems to screw orientation of shapes. 2014-02-28 05:46:02 +00:00
photonstorm
a6d77d00a0 World gravity restored. 2014-02-23 11:42:24 +00:00
photonstorm
3ac8fba9e8 Body.x/y didn't use pxpi. Also fixed out of bounds example. 2014-02-21 16:35:37 +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
91c0299d4c Fixed issues with the contacts and world bounds. New labs demo created. 2014-02-20 04:21:14 +00:00
photonstorm
1762983bc0 Fixed loadPolygon reference. Need to test decomp data next. 2014-02-19 17:09:01 +00:00
photonstorm
aac31bdaa4 debug#renderShapeConvex fixed, fix in p2 physics body creation #446 2014-02-19 15:43:05 +00:00
photonstorm
1d3616f52c Do not invert (physics) shape size data for circle, rectangle, capsuel & line #445 2014-02-19 15:21:03 +00:00
photonstorm
5f79bb4330 Fix typos of method names in Button.js for doc #444 2014-02-19 15:01:59 +00:00
photonstorm
7394403bb6 Fresh build. Updated docs and re-built phaser.js. 2014-02-19 05:28:19 +00:00
photonstorm
d9080052c3 Disabled World bounds by default.
Body.collides now takes a group level callback.
Added Body.createBodyCallback and Body.createGroupCallback.
2014-02-19 05:22:37 +00:00
photonstorm
f6807e23c6 Fixed Body.removeFromWorld 2014-02-19 04:05:12 +00:00
photonstorm
08e5f18257 Fixed some doc typos.
You can now pass a physicsConfig object with the game constructor that is given to p2.World, allowing you to set the broadphase, etc.
2014-02-19 03:51:48 +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
5968dd053b CollisionGroup and collision masks working. Need to refine a little, but all the essentials are there. 2014-02-19 01:51:14 +00:00