Richard Davey
b50e1c78b5
Lots more jsdoc tweaks and improvements
2019-02-12 15:01:54 +00:00
Richard Davey
dc73993fe2
Added jsdoc version numbers
2019-02-12 12:22:25 +00:00
Richard Davey
ccaae460a4
Added jsdoc version numbers to each event
2019-02-12 11:37:58 +00:00
Richard Davey
62399a3aa5
Removed un-used package
2019-02-10 17:33:51 +00:00
Richard Davey
0ab61ac6de
When the Matter World creates its wall bounds, the left and right walls now extend further up and down than before, so that in a 4-wall setting there are no gaps in the corners, which previously allowed for fast moving objects that hit a corner intersection point to sometimes travel through it.
2019-02-09 16:27:20 +00:00
Richard Davey
fd8d75ab02
Refactored the Pointer Constraint to make it work more like a real pointer does, added missing events, added full jsdocs.
2019-02-09 16:02:21 +00:00
Richard Davey
7041601893
Added drag events to Pointer Constraint
2019-02-09 14:58:42 +00:00
Richard Davey
bb83f4803e
Testing Pointer events.
2019-02-08 19:46:23 +00:00
Richard Davey
5f03d2cd5e
Testing Composite.remove, instead of removeBody.
2019-02-08 19:46:13 +00:00
Richard Davey
0b4dc5f037
Should be a config setter.
2019-02-04 21:50:55 +00:00
Richard Davey
60542a25cc
Numerous jsdoc and TS related fixes
2019-02-04 17:16:08 +00:00
Richard Davey
4f6f6ee72f
Lots of jsdoc and type fixes
2019-01-31 12:19:01 +00:00
Richard Davey
ebe4af217c
lint fix
2019-01-24 00:30:44 +00:00
Richard Davey
cf2095f0c8
The Arcade Physics Body has a new property maxSpeed
which limits the vector length of the Body velocity. You can set it via the method setMaxSpeed
and it is applied in the World.computeVelocity
method
2019-01-24 00:26:29 +00:00
Richard Davey
4c24799eac
Arcade Physics could trigger a collide
event on a Body even if it performing an overlap check, if the onCollide
property was true
2019-01-18 16:16:14 +00:00
Richard Davey
7237277abe
Merge pull request #4287 from samme/fix/arcade-body-deltas
...
Queue 'late' colliding bodies for a second update
2019-01-18 16:03:36 +00:00
Richard Davey
1eccff1e3b
Fixed jsdoc links and markdown bullet lists
2019-01-18 15:20:56 +00:00
Richard Davey
bc962c25dc
All listeners use the new Events
2019-01-18 13:41:43 +00:00
Richard Davey
8b35743943
Matter Events added
2019-01-17 15:47:27 +00:00
Richard Davey
99cd0259fe
Spelling mistake fix.
2019-01-17 14:57:24 +00:00
Richard Davey
d41286bd4f
Added Impact Events.
2019-01-17 14:54:38 +00:00
Richard Davey
5494f6ac79
Arcade Physics Events
2019-01-17 14:04:36 +00:00
Richard Davey
aa341854c7
Happy New Year
2019-01-15 16:20:22 +00:00
Richard Davey
49c2868746
All default width/height values are now taken from the Scale Manager, not the Game Config
2019-01-11 15:57:57 +00:00
samme
87bd2e68d3
Queue 'late' colliding bodies for a second update
...
- Fixes #4154
- Fixes #4284
2019-01-09 12:56:32 -08:00
Richard Davey
30dda882eb
Matter.TileBody.setFromTileCollision
no longer checks if the shape is concave or convex before modifying the vertices, as the update to the Matter.js lib in 3.12 stopped this from working with Tiled collision shapes.
2019-01-08 11:50:21 +00:00
Richard Davey
566df734a0
MatterSprite
would set its type
property to be Image
. It now sets it to be Sprite
as it should do.
2019-01-04 14:16:10 +00:00
Richard Davey
af5b1f2427
StaticBody.reset
in Arcade Physics would ignore the x
and y
values given to it. If given, they're now used to reset the parent Game Object before the body is updated. Fix #4224
2018-12-12 12:39:47 +00:00
Richard Davey
cc55ee73cf
Changing scaleX
or scaleY
on a MatterImage
or MatterSprite
would cause the body scale to become distorted as the setters didn't use the correct factor when resetting the initial scale. Fix #4206
2018-12-12 12:07:16 +00:00
Richard Davey
1a407bc4f5
ArcadePhysics.Body.destroy
will now only add itself to the World pendingDestroy
list if the world property exists. This prevents Cannot read property 'pendingDestroy' of undefined
errors if you try to delete a physics body in a callback and then immediately change Scene (which tells the physics work to also delete all bodies)
2018-12-06 14:47:06 +00:00
Richard Davey
2780babe10
Final Doc Jam merge
2018-12-03 15:16:23 +00:00
Richard Davey
c1771ecdac
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-11-20 11:02:31 +00:00
Richard Davey
8cd45a72b2
ESLint fixes
2018-11-20 11:02:19 +00:00
Richard Davey
96b9db5cb7
Merge pull request #4150 from samme/docs/misc
...
Docs updates
2018-11-20 10:45:54 +00:00
Richard Davey
f06bb3d420
Formatting fix
2018-11-20 10:21:02 +00:00
Mike Thomas
a3965cb609
issue/4168 draw circular StaticBody as circle in drawDebug
2018-11-16 17:43:53 +01:00
samme
b5a2d9d0cf
Docs for Arcade Physics
...
Minor additions/corrections
2018-11-07 09:43:43 -08:00
samme
7ff8d51f98
Docs for input and physics events
2018-10-24 12:14:44 -07:00
Richard Davey
956a0913b8
Added new jsdocs
2018-10-22 12:12:31 +01:00
Richard Davey
0b3d54a198
Added jsdocs
2018-10-19 18:29:36 +01:00
Richard Davey
a083318e02
Added lots of missing jsdocs
2018-10-19 17:45:05 +01:00
Richard Davey
772159d8f0
Merge pull request #4118 from pierpo/patch-1
...
Fix issue with null config in Arcade PhysicsGroup constructor
2018-10-19 13:43:18 +01:00
Richard Davey
f26c869c61
Merge pull request #4069 from samme/feature/drawDebug
...
Use defaultStrokeWidth in Arcade.Body#drawDebug()
2018-10-19 13:27:45 +01:00
Richard Davey
16d297746d
Merge pull request #4122 from samvieten/patch-2
...
JSDocs wrong Boolean on checkCollision description
2018-10-19 13:16:18 +01:00
Richard Davey
4c4421c47f
Docjam merge
2018-10-19 12:32:43 +01:00
sam
467f165bf4
JSDocs wrong Boolean on checkCollision description
...
L647 "checkCollision.none = false to disable collision checks" this is false way description, changed to "= true"
As of pull request: photonstorm/phaser3-docs#75
2018-10-19 06:42:25 +08:00
Pierre Poupin
63458ab336
Fix issue with null config in PhysicsGroup constructor
2018-10-17 01:13:18 +02:00
Richard Davey
a043cc88ea
Changed version number
2018-10-12 18:32:52 +01:00
Richard Davey
a9938baec6
Merge pull request #4070 from samme/feature/arcade-group-config-enable
...
Add PhysicsGroupConfig.enable, Arcade.Body#setEnable()
2018-10-12 18:29:58 +01:00
Richard Davey
4b1c762296
Updated @memberOf to @memberof
2018-10-10 10:49:13 +01:00
Richard Davey
a9063604dc
Replace @readOnly with @readonly
2018-10-09 13:40:00 +01:00
Richard Davey
099489e26d
Added missing class desc
2018-10-01 14:44:30 +01:00
Richard Davey
e297b3272e
Added hundreds of new jsdoc descriptions
2018-10-01 11:35:01 +01:00
samme
69ff71e0bd
Add description for PhysicsGroupDefaults.setEnable
2018-09-29 14:09:05 -07:00
samme
5f4f5e6cfc
Merge branch 'master' into feature/arcade-group-config-enable
2018-09-29 14:07:09 -07:00
Richard Davey
3c4e6cda80
Arcade Physics shutdown
will check to see if the world instance still exists and only try removing it if so. This prevents errors when stopping a world and then destroying it at a later date.
2018-09-29 11:21:41 +01:00
Richard Davey
c237209bb8
Added new jsdocs
2018-09-28 12:19:21 +01:00
Richard Davey
37076516e2
Merge branch 'master' into docs/arcade-physics-2
2018-09-28 11:07:44 +01:00
Richard Davey
5a4d1e53c1
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-09-28 11:04:27 +01:00
Richard Davey
818a28073f
Added jsdocs
2018-09-28 11:04:19 +01:00
Richard Davey
534814adb0
Merge pull request #4065 from rgk/patch-4
...
Matter.js Force Component Docs
2018-09-28 11:03:34 +01:00
samme
adb2181a8a
Add docs for groups and Arcade.Factory
2018-09-26 12:25:09 -07:00
samme
536555236f
Add PhysicsGroupConfig.enable, Arcade.Body#setEnable()
2018-09-26 10:25:45 -07:00
samme
5d38357533
Use defaultStrokeWidth in Arcade.Body#drawDebug()
2018-09-26 09:50:48 -07:00
Richard Davey
8cc7650f8c
Arcade Physics Bodies will now sync the display origin of the parent Game Object to the body properties as part of the updateBounds
call.
2018-09-26 17:15:22 +01:00
Richard Davey
9c5876ffb0
Skip conditional if fromVerts given. Correctly set parts reference.
2018-09-26 14:15:38 +01:00
Richard Davey
80f7539a41
Matter.verts
, available via this.matter.verts
from within a Scene, is a quick way of accessing the Matter Vertices functions.
2018-09-26 14:13:03 +01:00
Richard Davey
df7245e3c5
Added all of the new Matter debug rendering options
2018-09-26 14:12:20 +01:00
Richard Davey
eb09c35056
The poly-decomp
library, as used by Matter.js, has been updated to 0.3.0.
2018-09-26 11:08:55 +01:00
samme
6a8e5d2082
Correct descriptions for customSeparateX, customSeparateY
2018-09-25 13:25:47 -07:00
Robert Kowalski
bf38ce9fd4
Revsions based on Comments
...
Updated, better?
2018-09-25 11:31:18 -04:00
Robert Kowalski
0020745544
Quick space.
2018-09-25 07:15:11 -04:00
Robert Kowalski
185b19787e
Matterjs Gravity Component Doc
2018-09-25 07:14:32 -04:00
Robert Kowalski
5d0d84fe55
Matter.js Force Component Docs
...
Checking if I did this well before I start jumping into multiple files.
2018-09-25 04:46:30 -04:00
samme
817720b42c
Correct description for Arcade.Body#maxVelocity
2018-09-24 16:58:00 -07:00
samme
31175ae61f
Correct overlapCallback
argument name
2018-09-24 16:52:15 -07:00
Richard Davey
89b9f42f3e
Adding jsdocs
2018-09-24 23:20:43 +01:00
samme
2a51d6b70f
Arcade Physics docs revisions
2018-09-24 12:12:56 -07:00
Richard Davey
5fe6dbbe0c
Added more jsdocs
2018-09-13 08:09:44 +01:00
jf908
4f5b43e0ed
Allow matter js bodies to render their debug graphics individually
2018-09-04 18:45:54 +01:00
Richard Davey
a6e650f26f
Merge pull request #4006 from samme/docs/arcade-image-body
...
Correct types for ArcadeImage#body, ArcadeSprite#body
2018-09-04 12:23:26 +01:00
Richard Davey
7c55e65543
Arcade Physics Body deltaX
and deltaY
methods will now return the previous steps delta values, rather than zero. Fix #3987
2018-09-04 12:16:24 +01:00
Richard Davey
3d989e136f
Arcade Physics World collideSpriteVsTilemapLayer
now syncs the collision results back to the body, allowing you to call collide
from within an update loop once again. Fix #3999
2018-09-04 12:12:51 +01:00
samme
c0e141513c
Correct types for ArcadeImage#body, ArcadeSprite#body
2018-09-02 14:45:39 -07:00
Richard Davey
00a31d2d88
Updated docs. Close #3997
2018-09-01 10:14:22 +01:00
Richard Davey
14d3f6b35c
Calling Arcade Physics collide
during an update
method wouldn't inject the results back into the Body parent, causing the bodies to carry on moving. Using Colliders worked, but manually checking did not. Now, both methods work. Fix #3777
2018-08-29 16:35:13 +01:00
Richard Davey
3469ff2cfd
Arcade Physics World has gained two new private properties _tempMatrix
and _tempMatrix2
. These are used by all bodies in the simulation that need a temporal matrix for calculations, rather than having their own instances.
2018-08-29 16:07:07 +01:00
Richard Davey
2c525845be
The Arcade Physics Body _tempMatrix
property has been removed. It was only used if the Body's Game Object had a parent. The matrix has been moved to the World instance instead, shared by all bodies.
2018-08-29 16:06:13 +01:00
samme
fb23367c63
Fix Arcade.World#disable
...
It was passing the wrong argument to disableBody, so failing.
2018-08-22 13:23:58 -07:00
Richard Davey
da64e41b2f
Fixed Matter require call freaking out webpack
2018-08-22 15:54:00 +01:00
Richard Davey
65fb366ecd
Matter updated to 0.14.2. Fix #3929
2018-08-22 14:01:35 +01:00
Richard Davey
a98b3c3b15
In Matter.js if you scaled a Body it would only scale correctly once, due to the way Matter handles scaling internally. We now automatically reset the Matter scale before applying the new value, which allows you to keep the Phaser and Matter object scales in sync. Fix #3785 #3951
2018-08-21 15:55:39 +01:00
Aurélien DUSSAUGE
b14d920581
Replace DistanceBetween with DistanceSquared in closest() and furthest() functions (ArcadePhysics.js)
2018-08-13 21:59:58 +02:00
Richard Davey
4bdb0de312
The Arcade Physics Body.speed
property is now set whenever you set the velocity via setVelocity
or setVelocityX
or setVelocityY
which stops the body velocity being reset to zero if useDamping
is enabled. Fix #3888
2018-08-08 17:31:22 +01:00
Michael Hadley
7675615b70
Update matter copy with bug fix from liabru/matter-js@4e04043fe0
2018-08-05 21:29:49 -05:00
Richard Davey
d50b72dd14
Fixed Group creation arguments
2018-08-01 18:01:36 +01:00
Richard Davey
3d23013b86
Body setSize changes to fix #3863 PR
2018-07-31 09:39:22 +01:00
Richard Davey
16234491f2
Merge pull request #3863 from tarsupin/patch-2
...
Empty params reset to current texture size
2018-07-31 09:31:05 +01:00
tarsupin
79d64abaa3
Add spaces after ifs
2018-07-24 20:06:18 -05:00
tarsupin
2e72c9966b
Reset body to match current frame
...
When using setSize, empty height and width will automatically assign to match the current frame of the game object.
2018-07-24 20:05:51 -05:00
tarsupin
7af6e5477f
Empty params reset to current texture size
...
If the width and height aren't provided, it resets the body's size to match the current frame of the game object's texture.
2018-07-24 19:53:41 -05:00
samme
7ebc7dd01f
Fix ArcadePhysics#closest, furthest
2018-07-18 16:23:38 -07:00
Richard Davey
7aa46657c2
Tidying up jsdocs and changing float to number
2018-06-26 23:19:14 +01:00
samme
b3ac91df5a
Fix blocked.none after separation
2018-06-19 14:48:07 -07:00
Richard Davey
7eac419d3c
Fixed namespace
2018-06-12 16:52:57 +01:00
Richard Davey
c7c104bc2b
Tidied up the formatting and jsdocs for Physics Editor parser
2018-06-12 13:07:19 +01:00
Richard Davey
9a53daa068
Merge pull request #3729 from CodeAndWeb/matterjs-pe-loader
...
Matterjs pe loader
2018-06-12 11:54:18 +01:00
Joachim Grill
ff7f614a8e
renamed to PhysicsEditorParser, added jsdocs
2018-06-11 16:37:32 +02:00
Richard Davey
1777c47a23
Added missing check
2018-06-08 00:22:58 +01:00
Andreas Loew
bcef469e1c
Trivial change to trigger travis ci build.
...
The last build failed because of lint issues outside of our code.
2018-06-05 07:45:56 +02:00
Andreas Loew
fea754f1f9
Converted code to ES5
2018-06-04 22:44:36 +02:00
Joachim Grill
6c58bd9029
fixed lint issues
2018-06-04 11:12:02 +02:00
Richard Davey
15af7c6d0c
Added jsdocs
2018-06-04 01:38:45 +01:00
Richard Davey
e7fec396e1
If a Body collides with a Static Body it will now set the blocked
properties accordingly
2018-06-03 21:17:33 +01:00
Richard Davey
579c6ba607
Body.useDamping is a new boolean property that allows you to use a damping effect for drag, rather than the default linear deceleration.
2018-06-03 17:08:08 +01:00
Richard Davey
9aa80b2b49
World.computeVelocity now uses the Body.useDamping property to perform either linear deceleration or damping on the Body.
...
updateMotion has been stream lined.
computeVelocity has been rewritten, takes new arguments, performs better internally.
2018-06-03 17:07:41 +01:00
Richard Davey
bbf6211107
Refactored enable and disable flow and added lots of jsdocs.
2018-06-02 12:45:25 +01:00
Richard Davey
9875318f20
Added missing dx/dy properties
2018-06-01 19:52:52 +01:00
Richard Davey
40a3896962
Added more jsdocs, setFPS and optimized group vs. sprite and RTree use
2018-06-01 19:19:07 +01:00
Richard Davey
586d1827e0
Removed dirty property, optimized update loop, refactored postUpdate for fixed time step
2018-06-01 19:18:40 +01:00
Richard Davey
329c9266b4
GetOverlapX/Y now use the calculated delta values, not the deltaX/Y methods
2018-06-01 15:41:40 +01:00
Joachim Grill
bc4186061c
added getter for center of mass
2018-06-01 14:42:59 +02:00
Joachim Grill
4719694f33
matter-js physics: added loader for shapes created and exported with PhysicsEditor
2018-06-01 14:42:28 +02:00
Richard Davey
4ad7993b78
Added fixed timestep logic to Arcade Physics World
2018-06-01 03:25:33 +01:00
Richard Davey
652b7b04ba
Huge new ArcadeColliderType
def. Fix #3714 .
2018-05-31 15:52:45 +01:00
Richard Davey
6ab124c591
Merge pull request #3687 from thomastanck/thomastanck-typedefupdates
...
Update type definitions
2018-05-24 13:49:30 +01:00
Richard Davey
68303622f2
Setting an existing Game Object as a static Arcade Physics body would sometimes incorrectly pick-up the dimensions of the object, such as with TileSprites. Fix #3690
2018-05-23 15:17:26 +01:00
Richard Davey
de8462efed
Added default values and tidied up docs a little
2018-05-22 16:19:18 +01:00
Richard Davey
1485f34cbe
Merge pull request #3682 from samme/feature/arcade-body-setters
...
Add `allowDrag`, `allowGravity`, `allowRotation` to Arcade.PhysicsGroup config
2018-05-22 16:12:39 +01:00
Thomas Tan
0c61eb0062
Return type this for Arcade Physics components too
2018-05-22 16:09:28 +08:00
Thomas Tan
ff38588285
Specify type of ArcadeSprite.body
...
Do this by overwriting this.body in ArcadeSprite constructor.
2018-05-22 10:16:21 +08:00
Thomas Tan
8124ba9b86
Allow object param type for Arcade group Factory
2018-05-22 10:15:42 +08:00
Thomas Tan
806b5981b0
Add Group to param type in Arcade collide/overlap
2018-05-22 10:11:15 +08:00
Thomas Tan
3589b95bbd
Fix setCollideWorldBounds param type for Arcade
2018-05-22 10:05:37 +08:00
samme
24efda7aca
Add allowDrag
, allowGravity
, allowRotation
to PhysicsGroup config
2018-05-16 10:36:23 -07:00
samme
06677c2cdc
Allow empty object2 in collideObjects
2018-05-15 13:11:31 -07:00
Richard Davey
350cb037b7
All systems now register themselves with the new PluginCache
2018-05-15 12:51:50 +01:00
Richard Davey
be330e609e
Moved PluginManager to new location
2018-05-10 17:14:33 +01:00
samme
a70fb6aee9
Add docs for Arcade Physics
2018-05-09 21:28:52 -07:00
Bill Reed
a996bbf8df
update collider and overlap param types
2018-04-30 08:44:02 -04:00
Bill Reed
3fc0712451
update collider param types
2018-04-30 08:43:21 -04:00
Bill Reed
e3af569642
update overlap and collide params
2018-04-30 08:42:49 -04:00
Bill Reed
7251824b1d
arcade colliders take gameobjects, not arcade bodies
2018-04-30 07:46:46 -04:00
Bill Reed
a50b302216
same for overlap
2018-04-29 11:35:19 -04:00
Bill Reed
b483fc4e1a
update arcade collider factory method optional params to match arcade world collider optional params
2018-04-29 11:33:01 -04:00
Richard Davey
349a95bc4b
Updating to 3.6.0
2018-04-19 14:45:45 +01:00
Richard Davey
f57ab02fe6
Recoded how RTree generations its functions. Solves perf issue introduced in 3.4 Fix #3594
2018-04-18 22:32:52 +01:00
Richard Davey
b0544c73b8
jsdoc fixes
2018-04-18 13:29:22 +01:00
Richard Davey
1be486fab4
destroy
only called once, no matter how many times the Scene restarts. Fix #3581
2018-04-17 12:25:45 +01:00
Richard Davey
07a55e5d1f
Removed debug call and merged Scene Systems boot and start sequences. Fix #3579
2018-04-17 02:34:07 +01:00