Richard Davey
1a493caa4b
Merge pull request #4970 from samme/fix/arcade-body-setSize-center
...
Fix centering in Body#setSize()
2020-02-04 11:26:17 +00:00
samme
7d5673a0c7
Fix wrong body dimensions from a scaled game object
2020-02-01 17:25:15 -08:00
samme
a312d03843
Docs for Phaser.Physics.Arcade.StaticBody
...
`offset` is read only
2020-02-01 16:30:25 -08:00
samme
c07c57f9f8
Correct center
2020-02-01 16:27:02 -08:00
samme
a13d623743
Correct dimensions from game object
2020-02-01 16:20:46 -08:00
samme
37c64dc0a9
Correct center
in constructor
2020-02-01 16:19:10 -08:00
samme
34176becb5
Correct position
in constructor
2020-02-01 16:18:52 -08:00
Richard Davey
52b3176771
Update MatterTileBody.js
2020-01-28 23:25:51 +00:00
Richard Davey
d56a6c8790
MatterTileBody
now extends EventEmitter
, meaning you can listen to collision events from Tiles directly and it will no longer throw errors about gameObject.emit
not working. Fix #4967
2020-01-28 23:25:12 +00:00
samme
bc39e70412
Fix centering Body in setSize()
2020-01-27 11:15:06 -08:00
Richard Davey
4a6b2087f7
Fixed internal callback handlers
2020-01-15 12:45:59 +00:00
Richard Davey
ff65e69cd1
Changed copyright date to 2020
2020-01-15 12:07:09 +00:00
Richard Davey
c3940e15c6
PhysicsGroup
now uses the new internalCreateCallback
and internalRemoveCallback
to handle its body creation and destruction, allowing you to use your own createCallback
and removeCallback
as defined in the Group config. Fix #4420 #4657 #4822
2020-01-14 23:57:48 +00:00
Richard Davey
fb7f66838a
Marked width/height as readonly and added docs. Fix #4806
2020-01-14 22:45:55 +00:00
Richard Davey
f15ef8648e
Lots of type fixes
2020-01-14 17:11:07 +00:00
Richard Davey
91e59ab39a
Update MatterPhysics.js
2020-01-14 14:59:35 +00:00
Richard Davey
1c6e8df436
Update MatterPhysics.js
2020-01-13 17:10:19 +00:00
Richard Davey
51aa5d019d
Removed namespace as it conflicts with TypeScript defs
2020-01-13 13:28:50 +00:00
Richard Davey
9c0b77db92
Fixed JSDocs
2020-01-13 13:28:24 +00:00
Richard Davey
8b9819b8f7
Merge pull request #4949 from samme/fix/collideSpriteVsSprite
...
Check for disabled body in collideSpriteVsGroup()
2020-01-13 11:34:36 +00:00
Richard Davey
271e4e3943
Use FuzzyEquals for safety
2020-01-13 11:33:21 +00:00
Andrew Brampton
e42f227ec2
Update documentation and one import, to use the consistent name of Vector2
.
...
There were examples that used Vec2, which wouldn't work. For example `An array of Point or Vector2 objects: [new Phaser.Math.Vec2(x1, y1), ...]` was not copy and pastable.
2020-01-11 06:46:25 -08:00
Richard Davey
cf1e4645f3
Ignore if CoM is 0.5
2020-01-10 18:05:20 +00:00
Richard Davey
f90d679d22
Added setToSleep and setAwake methods
2020-01-10 17:39:40 +00:00
Richard Davey
d884fd0468
Handle scaled bodies properly
2020-01-10 17:03:50 +00:00
Richard Davey
8b1cc40a23
SetBody can now use JSON data natively
2020-01-10 16:24:40 +00:00
Richard Davey
8e7c3103d8
Moved the fromJSON code to its own external parser
2020-01-10 16:24:30 +00:00
Richard Davey
88cd83a508
Fixed bug in PhysicsEditorParser where it would allow non-clockwise vertices through
2020-01-10 15:32:03 +00:00
Richard Davey
1d827c911f
0.2 is just too dim
2020-01-10 14:53:39 +00:00
Richard Davey
ea2337c091
Only if parts = 1
2020-01-10 14:53:27 +00:00
Richard Davey
282a4df811
Update Factory.js
2020-01-10 14:53:17 +00:00
Richard Davey
e07513b707
Small restructure
2020-01-10 11:20:53 +00:00
Richard Davey
4e53d74581
Removed un-used properties
2020-01-10 11:20:41 +00:00
Richard Davey
e27914792e
More robust checks
2020-01-10 10:52:54 +00:00
Richard Davey
0d66c98ff0
Added JSDocs for fromPhysicsEditor
method and tidied things up a bit.
2020-01-10 08:56:49 +00:00
Richard Davey
ea338cadaa
Fixed JSDocs and origin assignment.
2020-01-10 08:56:31 +00:00
Richard Davey
5c9c00bfdb
Removed un-used code.
2020-01-10 08:56:17 +00:00
Richard Davey
887227a313
Added centerOffset back and fixed calculations
2020-01-10 08:55:56 +00:00
Richard Davey
6c947c9677
Updated PhysicsEditor Parser
...
Now allows you to specify options object to override the loaded config. Also removed un-used parameters and fixed JSDocs. Finally, using Common.clone to avoid mutating the loaded JSON.
2020-01-10 08:55:31 +00:00
samme
eacb61e109
Check for disabled body in collideSpriteVsGroup()
2020-01-09 19:45:11 -08:00
Richard Davey
d63001d719
Testing offsets
2020-01-09 17:55:03 +00:00
Richard Davey
590256fe92
Added fromPhysicsEditor method
2020-01-09 17:54:38 +00:00
Richard Davey
d3aaff82e1
Finished JSDocs
2020-01-09 16:38:33 +00:00
Richard Davey
a8f3c3b9c0
New BodyBounds class for getting body bounds based coordinates
2020-01-09 13:18:44 +00:00
Richard Davey
fceef3ddf0
Added BodyBounds class
2020-01-09 13:18:24 +00:00
Richard Davey
d031d91f1e
Added bodyBounds class, finished alignBody and fixed typedefs
2020-01-09 13:18:13 +00:00
Richard Davey
9aeead5cc2
New Body typedef
2020-01-09 13:17:56 +00:00
Richard Davey
4de6f17a38
Formatted docs
2020-01-09 13:17:43 +00:00
Richard Davey
cfa6eeb6e2
Finished alignBody method
2020-01-09 00:43:46 +00:00
Richard Davey
4d0618232b
Only render compound bounds
2020-01-09 00:43:38 +00:00