photonstorm
0f3849491d
P2.BodyDebug circles were drawing at half widths (thanks @enriqueto #1288 )
2014-11-08 14:09:26 +00:00
Pete Baron
497e919e43
Adjusted particle emitter for slow-mo.
...
Removed un-needed physics changes.
2014-11-03 13:01:14 +13:00
Pete Baron
0da8c6cb1a
Established fixed steps for logic update with catch-up for dropped frames.
...
Render update runs every frame.
Tweens moved into render update to maintain smooth motion.
Added Time.slowMotion factor, integrated with logic/render updates and tweens.
2014-11-03 12:02:43 +13:00
photonstorm
96fd0ade74
JSDoc fixes.
2014-10-21 22:43:42 +01:00
photonstorm
00b5472d4c
jshint fixes.
2014-09-29 12:29:18 +01:00
photonstorm
b0e96a37b9
Added Box2D handler support.
2014-09-29 12:27:28 +01:00
DanX
3a1ec3c5c1
Fix docs for collide and collideHandler
2014-09-26 22:37:11 -03:00
photonstorm
20551f9129
Lots of jsdocs fixes ready for the new doc generator.
2014-09-16 17:35:08 +01:00
photonstorm
5eedc4c2c5
The physics config object is now stored locally in World.config.
2014-09-09 12:49:31 +01:00
photonstorm
59f7c53019
P2.Body.addCapsule didn't use to pass the radius value through pxm, but now does so you have to specify it in pixels, not meters.
2014-09-08 22:34:53 +01:00
Richard Davey
55400ce988
World.createDistanceConstraint signature changed to include new local anchors (thanks @rhmoller #1169 )
2014-09-04 22:22:10 +01:00
photonstorm
865c6878bf
P2.World.getSprings used to return an empty array, but now returns all the Springs in the world ( #1134 )
2014-09-02 15:06:43 +01:00
Carlos Martinez
ec9a8b6903
Firxed for travis build.
2014-09-01 15:03:29 +01:00
Carlos Martinez
9843818f30
Merge branch 'dev' of https://github.com/photonstorm/phaser into dev
2014-09-01 14:19:50 +01:00
Carlos Martinez
0640cc0c03
Added support to pass 2 array in Arcade collide and overlap (response to an issue).
2014-09-01 14:01:36 +01:00
photonstorm
070e33f1e7
ArcadePhysics.overlap has been updated so that the Body.overlapX/Y properties are set to the amount the two bodies overlapped by. Previously they were zero and only populated during the separation phase, but now the data is available for just overlap checks as well. You can then use these values in your ovrelap callback as required - note that they are changed for every check, so a Sprite overlap tested against 10 other sprites will have the overlapX/Y values updated 10 times in a single collision pass, so you can only safely use the values in the callback ( #641 )
2014-09-01 03:54:55 +01:00
photonstorm
9b6ffc3f94
Moved Springs to not extend p2 Springs as they break when added to the p2.World. Springs and spring removal now working properly ( #1134 )
2014-08-29 14:13:20 +01:00
photonstorm
69b9e5eb7c
Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo #877 #1147 )
2014-08-29 01:28:43 +01:00
Richard Davey
32989094f4
Merge pull request #1147 from pyromanfo/dev
...
Fix for group vs group within group collision (fixes #877 )
2014-08-29 01:27:01 +01:00
Allen Cook
5a3eeb8a9c
Fix for group vs group within group collision ( fixes #877 )
2014-08-28 20:23:02 -04:00
photonstorm
dd160f004b
jsdocs update for collideWorldBounds #1010
2014-08-29 01:16:05 +01:00
photonstorm
6fbaa36ddd
P2.PointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
...
P2.InversePointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
P2.PointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
P2.InversePointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
2014-08-28 17:04:58 +01:00
photonstorm
a7d9b2c8c5
The P2.World.postBroadphaseHandler now checks if the returned pairs array is empty or not before processing it (thanks @wayfu #934 )
2014-08-28 04:24:08 +01:00
photonstorm
0f207c47a7
Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077 )
2014-08-28 03:44:02 +01:00
photonstorm
ec687868de
Input.setMoveCallback has been removed due to deprecation.
...
BitmapData.refreshBuffer has been removed and replaced with BitmapData.update.
BitmapData.drawSprite has been removed due to deprecation. Use BitmapData.draw instead.
Pointer.moveCallback has been removed due to deprecation.
SinglePad.addButton has been removed due to deprecation.
P2.Body.loadData has been removed due to deprecation.
P2.World.defaultFriction and defaultRestitution have been removed due to deprecation.
Canvas.create noCocoon parameter has been removed due to deprecation.
Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
2014-08-28 03:40:59 +01:00
photonstorm
c87aa5103d
Fixed the RevoluteConstraint worldPivot and moved it to the end of the signature to minimise code changes.
2014-08-28 01:14:59 +01:00
photonstorm
aeb82dbee9
World.createRotationalSpring will now let you create rotational springs.
2014-08-28 00:58:50 +01:00
photonstorm
6acc8bf9f2
World.enableBodySleeping has been removed and replaced with World.sleepMode.
2014-08-28 00:45:57 +01:00
photonstorm
98ccae56de
P2.Body now uses the new Body.type value instead of Body.motionState, however as P2.Body already have a property called type
we have left the motionState
getter/setter in for now.
2014-08-28 00:39:47 +01:00
photonstorm
4935a4e4af
RevoluteConstraint fixed for new version of p2.
2014-08-28 00:24:56 +01:00
photonstorm
b25bdf3523
Fixed the DistanceConstraint parameters.
2014-08-28 00:15:28 +01:00
photonstorm
504b69ffaa
Updated p2.js to d1c7a340c42e4d5d1d939fba5fd13c5e49d6abd2
...
Updated grunt replace task to match p2s new UMD signature.
2014-08-28 00:01:35 +01:00
photonstorm
36ecd81f29
Arcade Physics Body.skipQuadTree is a new boolean that if set to true
when you collide the Sprite against a Group it will tell Phaser to skip using a QuadTree for that collision. This is handy if this Body is especially large.
...
Arcade Physics World.skipQuadTree will disable the use of all QuadTrees in collision methods, which can help performance in tightly packed scenes.
2014-08-04 13:04:11 +01:00
Richard Davey
acceb692c3
Merge pull request #1071 from Dumtard/dev
...
Fix for previous PR #1028
2014-07-31 13:48:15 +01:00
photonstorm
9bbc8ecce3
Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060 )
2014-07-31 13:39:26 +01:00
Charles Black
a90ab2e59b
P2 bounds now collides with everything by default
2014-07-27 16:06:55 -04:00
photonstorm
d72e199291
Physics.bounds now correctly matches World.bounds on system start (thanks @Dumtard #1028 )
2014-07-16 00:14:47 +01:00
Petar Petrov
78771d875b
Fix issue #883
...
Check if points is an Array before parsing arguments.
2014-07-12 22:50:48 +02:00
photonstorm
2293b64c94
Removing debug / console.log output.
2014-07-09 05:49:13 +01:00
Richard Davey
6ce183189f
Merge pull request #971 from psalaets/issue-970
...
reorder param list of Phaser.Physics.Arcade.Body.render
2014-07-07 10:29:51 +01:00
Paul Salaets
cbf0a9011a
remove a little duplication
2014-07-05 21:53:32 -04:00
Paul Salaets
0c15ef6adc
move shape specific debug rendering into the shapes
2014-07-05 21:29:28 -04:00
Paul Salaets
77b86f43e3
support for debug rendering ninja AABB and circle bodies
2014-07-05 20:58:33 -04:00
Paul Salaets
79f550bc89
updating comments: default color and method name
2014-07-05 18:08:00 -04:00
Paul Salaets
0694dab909
reorder param list to be consistent with comment's ordering and other code
2014-07-05 17:50:13 -04:00
photonstorm
6e94aa7cde
Updated applyForce docs.
2014-07-02 16:29:30 +01:00
Richard Davey
a425470f41
Merge pull request #925 from jonkelling/dev
...
Fix for issue #917 , Physics.P2.Body#addToWorld
2014-07-01 15:52:29 +01:00
Richard Davey
ba29d5bd4b
Merge pull request #910 from TatumCreative/dev
...
Fix null returns for play()
2014-07-01 15:39:17 +01:00
Richard Davey
117aef650b
Merge pull request #956 from Phaiax/phaserdts-createcollisiongroup
...
createCollisionGroup -> public, included in .d.ts file
2014-07-01 15:37:31 +01:00
Richard Davey
2fb9217776
Merge pull request #955 from Phaiax/issue952-p2bounds
...
P2 bottom world wall position fix
2014-07-01 15:36:02 +01:00
Richard Davey
1a0ebe6d26
Merge pull request #954 from Phaiax/issue953-bodydebug
...
inverting debug getter result
2014-07-01 15:35:35 +01:00
Phaiax
00bf349ff5
Body.enable only exists in Arcade physics, so move conditions concerning this into arcarde
2014-06-30 12:49:53 +02:00
Phaiax
18229d1673
fix jshint warning
2014-06-29 18:23:43 +02:00
Phaiax
394e70db06
inverting debug getter result
2014-06-28 01:33:02 +02:00
Phaiax
441d0a816e
P2 bottom world wall position fix
2014-06-28 01:28:59 +02:00
Phaiax
961d25cadc
createCollisionGroup -> public, included in .d.ts file
2014-06-28 01:25:51 +02:00
photonstorm
cd60554c78
Added P2 body anchor docs to clarify #938
2014-06-23 23:34:27 +01:00
jonkelling
36d70697db
Fix for issue #917 , Physics.P2.Body#addToWorld
...
Fix for issue #917 : Calling reset() on Sprite with a P2 body can result in body.data.world == null.
Calling addToWorld() would previously not check the _toRemove array, which could, if the timing were right, result in a Sprite being revived but then removed from the P2 World--the result of this being the Sprite's data would be in a mixed state causing it to appear visually but not function in the world.
2014-06-17 21:53:20 -05:00
Greg Tatum
50f91eae54
Shape changed not called on removeShape
...
It looks like a bunch of these methods that modify the body don't call shapeChanged(). If you want I can add them all and resubmit.
2014-06-17 08:36:39 -05:00
photonstorm
69525799d7
New build files for testing.
2014-06-11 12:46:49 +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
Richard Davey
13700148fb
Merge pull request #891 from aivins/issue890
...
Separate from TilemapLayer after custom callbacks.
2014-06-11 00:00:20 +01:00
Lewis Lane
a16cb3f5a2
Added notes to overlap/collide regarding non-recursiveness
...
Made it clear that the overlap and collide methods do not recursively check for collisions, i.e. in the case of being passed a Group containing other Groups or Tilemaps.
2014-06-09 08:05:23 +01:00
Andrew Ivins
ccd914620d
Separate from TilemapLayer after custom callbacks.
2014-06-09 14:28:14 +08: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
88306b6e12
P2 World array reset fix.
2014-05-20 10:03:00 +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
bd4c2176f0
Added an additional tile index check to P2.World.convertTilemap.
2014-05-01 02:40:17 +01:00
photonstorm
b40769019b
The P2 DistanceConstraint method signature has changed. Updated Phaser so maxForce is now passed as object ( fix #788 )
2014-04-30 16:54:56 +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
Wouter Commandeur
b1953bd0a0
fix creation of RevoluteConstraint by passing maxForce in the options
2014-04-29 20:12:56 +02:00
photonstorm
1d37cde66f
Updated p2 to latest build and patched for Float32Array + UMD issues.
2014-04-29 02:34:16 +01:00
photonstorm
251bc10327
jshint fixes.
2014-04-25 02:52:14 +01:00
Georgios Kaleadis
33fc41a9b0
fix comment
2014-04-24 11:59:55 +02:00
Georgios Kaleadis
339da73160
pausable p2 world
2014-04-24 11:56:52 +02: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
Georgios Kaleadis
c0189c02c1
fixed loadPolygon center of mass
2014-04-22 19:56:25 +02:00
Opher Vishnia
22b62726ad
Fixed typo in world.setMaterial
...
The function contained a typo: bodies is an Array and so bodies.setMaterial is undefined
2014-04-19 19:39:50 +03: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
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
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
a2b2d558a5
jsdoc and jshint fixes.
2014-04-11 03:02:19 +01:00
photonstorm
77f8e5eefc
P2 Fixtures Collection Class (@georgiee please test it works ok! #704 )
2014-04-11 00:43:30 +01:00
Richard Davey
b7b1e7428a
Merge pull request #704 from georgiee/fixture-list
...
P2 Fixtures Collection Class
2014-04-11 00:19:05 +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
Georgios Kaleadis
13e5cacd71
added a p2 fixture collections helper class
2014-04-10 23:45:35 +02:00
Georgios Kaleadis
1213cae0a4
additionally save fixtures by key
2014-04-10 21:28:14 +02:00
photonstorm
289b5b2532
Removed un-used vars.
2014-04-10 17:25:35 +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
8449f77152
Fixed World.restitution typo.
...
Updated World to use the new p2 defaultContactMaterial.
2014-04-10 14:41:50 +01:00
photonstorm
8bb22551aa
Added jsdocs to Particle and Emitter. Fixed p2 UMD.
2014-04-10 01:48:55 +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
451f68be96
Updated p2 to 6abc900ff9
(which has probably broken stuff, but we'll test it tomorrow).
2014-04-08 03:30:45 +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
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
9762bff5eb
Updated docs to specify callback parameter order ( #667 )
2014-04-01 00:50:24 +01:00
Georgios Kaleadis
0a456d81c1
remove physics loader flags in p2 world, fix naming in loader
2014-03-31 10:46:17 +03:00
Georgios Kaleadis
d2a348f0bb
return the result of body#setCircle
2014-03-28 09:48:23 +02:00