Richard Davey
2f0231b3cd
Merge pull request #2415 from jakewilson/dev
...
Fixed and added warnings.
2016-04-06 01:21:09 +01:00
photonstorm
6933b41e6f
Arcade.Body's speed property was only set when the body moved, it now updates regardless (thanks @mark-henry #2417 )
2016-04-05 23:06:57 +01:00
Jake Wilson
96a79cd91a
Added warning if physics body is enabled on unknown physics system.
2016-04-05 11:23:17 -04:00
photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
Chad Engler
a510761bf1
fix typo in componentToHex
2016-03-09 15:54:40 -08:00
Richard Davey
0c48c2d6a8
* Added P2.Body.thrustLeft which will move the Body to the left by the speed given (thanks James Pryor)
...
* Added P2.Body.thrustRight which will move the Body to the right by the speed given (thanks James Pryor)
2016-03-01 22:31:58 +00:00
Richard Davey
5801f1aa15
jshint fixes.
2016-02-04 23:39:58 +00:00
photonstorm
a7c360425f
Tidying up code and docs.
2016-02-04 16:23:40 +00:00
Richard Davey
a8b04c4bf1
Merge pull request #2171 from mattrick16/dev
...
Add method to angle Display Objects relative to world
2016-02-04 18:21:14 +02:00
photonstorm
af4c938299
Docs update ( #1967 )
2016-02-04 16:05:45 +00:00
Richard Davey
8e6b88cda8
Merge pull request #2172 from jonjanisch/dev
...
Inconsistency in arcade.collide processCallback param order #667
2016-02-02 17:39:46 +02:00
Richard Davey
6a50e18bf0
Merge pull request #1610 from yigitozdemir/dev
...
On Ceiling Method Addition
2016-02-01 21:14:12 +02:00
Jonathan Janisch
24c85dbb35
Inconsistency in arcade.collide processCallback param order #667
2015-10-27 23:48:14 -04:00
mattrick
8843a4ad09
Add worldAngleToPointer
2015-10-27 16:55:23 -07:00
photonstorm
b91de47d8d
Readme and JSDocs updates.
2015-10-13 12:01:08 +01:00
Christoph Dörfel
a8c4930d42
Add JsDoc comment for Body#addPhaserPolygon return value
2015-09-17 12:11:49 +02:00
Christoph Dörfel
4c9412088c
Add option to prefix shape name and optimize JSON output
2015-09-16 14:00:24 +02:00
photonstorm
7487c15f0e
Doc updates.
2015-09-08 15:56:28 +01:00
Christoph Dörfel
96441fdb27
Set correct default value for 'clearCallback' on P2.Body.removeCollisionGroup
2015-08-30 01:30:33 +02:00
Christoph Dörfel
2623ddeaf7
Convenience function to remove a collision group from a P2 Body
2015-08-30 00:19:37 +02:00
photonstorm
486c15f16f
New docs.
2015-08-24 15:43:45 +01:00
photonstorm
55a7699381
Setting a P2.Body from Static or Kinematic to Dynamic will now automatically adjust the Body.mass to be 1 (thanks @wayfu #2005 )
2015-08-20 11:19:30 +01:00
Richard Davey
4eb223f987
jsdocs fix.
2015-07-31 18:39:37 +01:00
Richard Davey
a56cd31638
jsdoc updates.
2015-07-31 18:39:37 +01:00
vrecluse
632c258d8d
Fix p2 BodyDebug pixelsPerLengthUnit bug.
...
When mpx doesn’t return default value, the debug body size and position
goes wrong.
2015-07-31 00:04:32 +08:00
photonstorm
858ad51610
Phaser 2.4 release.
2015-07-22 15:31:30 +01:00
photonstorm
f15fe6706c
All undefined argument checks were changed from if (typeof x === 'undefined')
to if (x === undefined)
removing the typeof check and saving some bytes across the codebase in the process.
2015-07-22 10:37:15 +01:00
Richard Davey
9e38bf974a
World.stateChange is a new method that is called whenever the state changes or restarts. It resets the world x/y coordinates back to zero and then resets the Camera.
...
Sprites with Arcade Physics bodies that had `collideWorldBounds` enabled would be moved to the wrong position if you restarted a State (or swapped to a new State) that reset the world bounds (thanks @vulvulune #1775 )
2015-07-22 01:24:26 +01:00
Richard Davey
6531552b32
Merge pull request #1905 from standardgaussian/aabbninja
...
AABB vs. AABB collision in Ninja
2015-07-16 15:45:09 +01:00
photonstorm
a0d57544c7
P2 updates finished.
2015-07-13 14:48:33 +01:00
photonstorm
956fa493a6
The P2.Body.onBeginContact arguments have changed. It now sends 5 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A, the p2 Shape from Body B and the contact equations array. Note that the Phaser.P2.Body may be null if you collide with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.
...
The P2.Body.onEndContact arguments have changed. It now sends 4 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A and the p2 Shape from Body B. Note that the Phaser.P2.Body may be null if this is the end of a contact with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.
Upgraded to p2.js 0.7.0
2015-07-13 11:44:04 +01:00
Standard Gaussian
b8710d7066
Removed unused local variables in Ninja.AABB.reportCollisionVsBody
2015-07-11 21:28:15 +01:00
Standard Gaussian
e7356e003f
Implemented Ninja AABB vs AABB collisions
2015-07-11 21:04:16 +01:00
photonstorm
f48d038db3
Lots of jsdoc updates ( #1644 )
2015-07-08 15:10:41 +01:00
Richard Davey
f57d3c19e9
P2.Body.createGroupCallback incorrectly referenced the _groupCallbackContext
when deleting it (thanks @Langerz82 #1886 )
2015-07-07 01:24:26 +01:00
Standard Gaussian
a556dfdc69
Issue #1885 : P2.enableBody now checks if an anchor exists on target object before attempting to set its value
2015-07-05 22:39:15 +01:00
Richard Davey
306fbf4d5c
Merge pull request #1810 from Preece/tilemap-overlap
...
Sprite vs Tilemap can now check for overlap, without trying to separate
2015-06-17 01:38:42 +01:00
photonstorm
71cf2064ab
Fixed TS defs and jsdoc for Ninja convertTilemap #1756
2015-06-16 19:10:01 +01:00
photonstorm
17831e0103
P2.Body.loadPolygon now allows the key
parameter to be passed as null
- when this happens the object
parameter can be the actual physics object data instead of a string pointing to the cache, allowing you to take advantage of adding multiple convex shapes with automatic adjustments for center of mass #1801
2015-06-16 19:02:28 +01:00
photonstorm
58f4b07741
Clarified relationship between Sprite and BodyDebug #1795
2015-06-16 18:30:54 +01:00
photonstorm
c518fa32b7
Formatting.
2015-06-16 14:16:04 +01:00
Casey Clyde
e935df328d
Sprite vs Tilemap can now check for overlap, without trying to separate
2015-05-23 22:39:12 -07:00
photonstorm
19f8a7316e
ArcadePhysics.Body.syncBounds is a new property that if true forces the Body to check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly. If false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed. Typically you would need to enable syncBounds
if your sprite is the child of a responsive display object such as a FlexLayer, or in any situation where the sprite scale doesn't change, but its parents scale is effecting the dimensions regardless.
2015-04-29 13:13:26 +01:00
photonstorm
432516fa0f
Physics.Arcade.sort has a new property 'sortDirection'. If not specified it will use World.sortDirection. If the Group given as the first parameter has its physicsSortDirection
property set that will override any other setting.
...
Physics.Arcade.sort now calls one of four functions: sortLeftRight, sortRightLeft, sortTopBottom and sortBottomTop. Each of which takes 2 Sprites as arguments.
Physics.Arcade.sort now doesn't bail out if the Group contains a mixture of physics and non-physics enabled objects, as the Group hash is now only ever populated with physics enabled objects. Also the sort comparison functions no longer return -1 if the bodies are invalid, but zero instead (#1721 )
2015-04-13 16:29:34 +01:00
photonstorm
35bfe5fb2a
Body.destroy now automatically calls Group.removeFromHash
.
2015-04-13 16:27:43 +01:00
photonstorm
412338478c
Added in all hooks required for MatterJS Physics (coming soon!)
2015-04-13 16:16:34 +01:00
photonstorm
04cb3889a9
P2.getConstraints would return an array of null objects. It now returns the raw p2 constraint objects (thanks @valueerrorx #1726 )
2015-04-13 12:12:18 +01:00
Richard Davey
0b3fc61ba7
Merge pull request #1723 from dgoemans/dev
...
Fix for Phaser with requirejs
2015-04-13 11:29:58 +01:00
Chad Engler
b89cdd5a0c
check for existence of sprite on body destroy
2015-04-12 17:30:54 -07:00
David Goemans
73bace335a
Built a fix into p2.js v0.6.1 for using requirejs with phaser. This has also been put as a pull request to p2.js
2015-04-06 12:43:03 +02:00
photonstorm
ebdb6d028f
The Physics Manager now has a new reset
method which will reset the active physics systems. This is called automatically on a State swap (thanks @englercj #1691 )
2015-03-24 10:21:12 +00:00
photonstorm
77eaa7e707
Optimised World.collideHandler and added SORT_NONE option.
2015-03-23 15:05:57 +00:00
photonstorm
b07ce89236
sourceWidth / Height now only set from the texture if the object has a texture.
2015-03-23 15:05:39 +00:00
photonstorm
ba052389a3
New version of p2.js merged for testing.
2015-03-23 10:11:49 +00:00
photonstorm
3f30a3d0d2
jsdocs updates.
2015-03-23 10:11:39 +00:00
Chad Engler
f5af981da3
fix missing semicolon
2015-03-22 21:28:27 -07:00
Chad Engler
97410f8907
add debug drawing for p2 capsule shape
2015-03-22 19:45:18 -07:00
breakosaur
bb600b4319
Fixed a few documentation typos.
2015-03-18 21:07:36 +00:00
Chad Engler
0b3850cc0c
Fix debug drawing for p2 physics bodies
2015-03-18 01:19:32 -07:00
photonstorm
893d36f128
jsdoc fix.
2015-03-05 14:01:52 +00:00
photonstorm
2483cd5df4
Various readonly Body properties flagged as 'readonly' in the jsdocs ( #1643 )
2015-02-26 23:32:14 +00:00
photonstorm
f99f182a6f
Arcade Physics is now using a spacial pre-sort for all Sprite vs. Group and Group vs. Group collisions. You can define the direction the sort will prioritise via the new sortDirection
property. By default it is set to Phaser.Physics.Arcade.LEFT_RIGHT
. For example if you are making a horizontally scrolling game, where the player starts on the left and moves to the right, then this sort order will allow the physics system to quickly eliminate any object to the right of the players bounds. This cuts down on the sheer volume of actual collision checks needing to be made. In a densely populated level it can improve fps rate dramatically.
...
There are 3 other directions available (`RIGHT_LEFT`, `TOP_BOTTOM` and `BOTTOM_TOP`) and which one you need will depend on your game type. If you were making a vertically scrolling shoot-em-up then you'd pick `BOTTOM_TOP` so it sorts all objects above and can bail out quickly.
More importantly you can switch the `sortDirection` at run-time with no loss of performance. Just make sure you do it *before* running any collision checks. So if you had a large 8-way scrolling world you could set the `sortDirection` to match the direction the player was moving in and adjust it in real-time, getting the benefits as you go. My thanks to Aaron Lahman for inspiring this update.
2015-02-26 21:24:07 +00:00
photonstorm
03a2db18cb
Added extra protection in the case of mixed-type Groups.
...
Removed window vars and replaced with stats property.
Removed redundant if/else checks.
2015-02-25 06:06:40 +00:00
photonstorm
8aec760cd5
First pass at spacial sorting in World.collide.
2015-02-25 05:39:02 +00:00
photonstorm
a69e53f901
Copyright date change.
2015-02-25 03:36:23 +00:00
photonstorm
dee13d52d8
jshint fix.
2015-02-25 02:50:57 +00:00
photonstorm
c799dfe7da
Fixed physics postUpdate issue causing particles and all kinds of things to go awry.
2015-02-25 02:18:05 +00:00
photonstorm
3d399f1b14
Removed the final few private vars from computeVelocity
2015-02-25 00:04:53 +00:00
photonstorm
42b316473d
jsdoc fix.
2015-02-23 13:58:57 +00:00
photonstorm
a7bdce1806
Moved collideSpriteVsTilemapLayer to here.
2015-02-19 05:00:22 +00:00
photonstorm
eb732e1d90
Refactored ArcadePhysics.World to remove global property use and array length caches.
2015-02-19 04:59:55 +00:00
photonstorm
052b9a7e06
Separated the Tilemap specific code from World.
2015-02-17 15:49:53 +00:00
photonstorm
4bb1adcf36
Typo fix.
2015-02-17 06:00:18 +00:00
photonstorm
1229c791b3
Added Body.dirty flag (reserved for future use)
2015-02-17 05:13:54 +00:00
photonstorm
0588f95f4c
Body.phase renamed to Body.dirty.
2015-02-17 05:13:36 +00:00
photonstorm
86f05160b7
Removed array length vars and added strict equalities.
2015-02-17 05:13:12 +00:00
photonstorm
8483eac6aa
Removing all use of _cache from all Game Objects.
2015-02-16 17:22:51 +00:00
photonstorm
f60b2b7635
World.setBounds if called after you had already started P2 Physics would incorrectly create a new collision group for the wall objects. P2.World now remembers the settings you provide for each wall and the collision group, and re-applies these settings should the world dimensions ever change (thanks @nextht #1455 )
2015-02-11 22:33:29 +00:00
yigitozdemir
9ad1230257
On Ceiling Method Added
2015-02-11 01:36:35 +02:00
photonstorm
18ff04810f
ArcadePhysics.distanceToPointer now calculates the distance in world space values.
...
ArcadePhysics.moveToPointer no longer goes crazy if the maxTime parameter is given and the Sprite is positioned in a larger game world (thanks @AnderbergE #1472 )
2015-02-10 22:16:35 +00:00
photonstorm
816a80f39a
If Body.customSeparateX
or customSeparateY
is true
then the Body will no longer be automatically separated from a **Tilemap** collision or exchange any velocity. The amount of pixels that the Body has intersected the tile is available in Body.overlapX
and overlapY
, so you can use these values to perform your own separation in your collision callback ( #992 )
2015-02-10 12:58:12 +00:00
photonstorm
6081aa360f
P2.Body.clearCollision default values were incorrectly set to false
if no parameters were provided, even though the docs said they were true
(thanks @brianbunch #1597 )
2015-02-08 21:57:08 +00:00
photonstorm
d710caed9e
Body.reset now resets the Body.speed value to zero.
2015-02-05 05:12:31 +00:00
Richard Davey
66ad09ebd0
Merge pull request #1549 from tomlarkworthy/fixAdjustMass
...
Bug fix: adjust mass and debug body gfx
2015-02-03 21:12:15 +00:00
Richard Davey
0953e927b4
Merge pull request #1559 from vulvulune/dev
...
Complete "tsdocs" tasks to download plugins + improve ts doc + grunt:jsdoc
2015-02-03 21:04:30 +00:00
Richard Davey
21823f65e3
Merge pull request #1576 from vulvulune/jsdoc
...
Correct comments
2015-02-03 20:47:32 +00:00
Richard Davey
9efca46021
Merge pull request #1582 from micahjohnston/dev
...
Fix doc comment on Phaser.Physics.Arcade#getObjectsAtLocation.
2015-02-03 20:45:33 +00:00
zekoff
0ccd225e08
Allow max of 0 in computeVelocity
...
Previous method of setting default max did not allow falsey values.
2015-02-03 11:36:53 -06:00
Micah Johnston
34d443153f
fix argument name in comment on Phaser.Physics.Arcade#getObjectsAtLocation.
2015-01-30 05:48:34 -07:00
Micah Johnston
401d2fe847
Fix doc comment on Phaser.Physics.Arcade#getObjectsAtLocation.
2015-01-29 18:13:03 -07:00
photonstorm
d6ea8fb956
jsdoc updates (spelling mistakes, code formatting, etc)
2015-01-28 17:18:33 +00:00
vulvulune
1aab540a6f
Correct comment Phaser.Physics.P2.BodyDebug
...
Set correct method name in comments
2015-01-27 15:26:05 +01:00
vulvulune
7be4b8d7a9
Replace the grunt docs tasks with grunt-jsdoc
...
Replace builddoc and exportdocjson grunt tasks with grunt-jsdoc.
To avoid an error I added a fake comment to a @todo param in the p2.js
file.
2015-01-22 16:22:51 +01:00
photonstorm
587c3e5f6a
Arcade.Body.friction
allows you to have more fine-grained control over the amount of velocity passed between bodies on collision.
2015-01-18 12:24:00 +00:00
Tom Larkworthy
4b32505383
calling adjust mass desyncs the debug graphics from the real positions of bodies
2015-01-17 21:15:10 -08:00
photonstorm
0f42b530eb
Physics.Arcade.isPaused
allows you to toggle Arcade Physics processing on and off. If true
the Body.preUpdate
method will be skipped, halting all motion for all bodies. Note that other methods such as collide
will still work, so be careful not to call them on paused bodies.
2015-01-10 00:30:02 +00:00
photonstorm
8cd98e2e36
jsdocs fixes.
2015-01-05 10:59:10 +00:00
photonstorm
15d5b54c26
Removed redundant updateTransform call.
2015-01-02 04:15:27 +00:00
Richard Davey
3c4a9720c6
Body updateTransform patch re: #1493 and #1490
2015-01-01 12:33:43 +00:00
photonstorm
965fbc96e7
Typo fixes :)
2014-12-11 22:30:24 +00:00
photonstorm
3c564a33b6
The P2 World constructor wouldn't let you use your own config unless you specified both the gravity *and* broadphase. Now allows one or both (thanks @englercj #1412 )
2014-12-11 22:04:45 +00:00
photonstorm
4abb1550d7
P2.postBroadphaserHandler updated to avoid skipping final 2 pairs.
2014-12-11 22:00:06 +00:00
Paul
dab8772de0
Documentation - consistency updates
...
- Updated `readOnly` doclet to `readonly`
- `array` refined to `type[]`, where such information was immediately
determinable.
- Updated {Any}/{*} to {any}; {...*} is standard exception
- Udated {Object} to {object}
2014-11-30 04:03:35 -08:00
photonstorm
667d477a16
P2.BodyDebug always lagged behind the position of the Body it was tracking by one frame, which became visible at high speeds. It now syncs its position in the Body.postUpdate which prevents this from happening (thanks @valueerror)
2014-11-25 22:21:11 +00:00
photonstorm
7aaa63e7a5
When you change State the P2 Physics world is no longer fully cleared. All of the bodies, springs, fixtures, materials and constraints are removed - but config settings such as gravity, restitution, the contact solver, etc are all retained. The P2.World object is only created the very first time you call Physics.startSystem. Every subsequent call hits P2.World.reset instead ( #1292 )
2014-11-25 12:09:03 +00:00
Pete Baron
bc70ce74b5
Minor logic fix to nested loop counters.
2014-11-12 15:00:26 +13:00
Pete Baron
1c7059ea6c
Merge remote-tracking branch 'phaser-github/dev' into dev
...
Conflicts:
src/animation/FrameData.js
src/core/Game.js
src/particles/arcade/Emitter.js
src/time/Time.js
src/tween/Tween.js
2014-11-12 13:03:52 +13:00
Pete Baron
af09290cbf
Add getObjectsAtLocation method in Arcade physics.
2014-11-12 11:24:38 +13:00
photonstorm
8bf93fb658
ArcadePhysics.skipQuadTree is now set to true
by default. A QuadTree is a wonderful thing if the objects in your game are well spaced out. But in tightly packed games, especially those with tilemaps or single-screen games, they are a considerable performance drain and eat up CPU. We've taken the decision to disable the Arcade Physics QuadTree by default. It's all still in there and can be re-enabled via game.physics.arcade.skipQuadTree = false
, but please only do so if you're sure your game benefits from this.
2014-11-11 01:05:58 +00:00
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