Commit graph

691 commits

Author SHA1 Message Date
Richard Davey
89c963c19c Ignore consts 2018-03-30 14:38:58 +01:00
Richard Davey
0868d69fb6 Added memberOf 2018-03-30 14:24:18 +01:00
Richard Davey
2d6251a1e9 Swapping to enums 2018-03-29 16:42:20 +01:00
Richard Davey
cef9050627 jsdoc fixes 2018-03-29 14:53:06 +01:00
Richard Davey
d5fd3e20d9 Renamed namespace 2018-03-29 14:24:51 +01:00
Richard Davey
ce75947dac Swap to module 2018-03-29 14:02:25 +01:00
Richard Davey
e7191e9d8e jsdoc updates 2018-03-29 13:48:14 +01:00
Richard Davey
f5373b2dee jsdoc fixes 2018-03-29 13:23:44 +01:00
Richard Davey
f1e646c9ee jsdoc fixes 2018-03-28 15:39:57 +01:00
Richard Davey
747f09af86 jsdoc fixes 2018-03-28 15:04:09 +01:00
Richard Davey
2096729095 Missing require 2018-03-28 14:15:32 +01:00
Richard Davey
15c4334dc7 jsdoc fixes 2018-03-28 14:11:46 +01:00
Richard Davey
e7a1e3190a Matter Physics timestep adjustments (getDelta, step, set60Hz, etc)
* Matter Physics now has a new config property `getDelta` which allows you to specify your own function to calculate the delta value given to the Matter Engine when it updates.
* Matter Physics has two new methods: `set60Hz` and `set30Hz` which will set an Engine update rate of 60Hz and 30Hz respectively. 60Hz being the default.
* Matter Physics has a new config and run-time property `autoUpdate`, which defaults to `true`. When enabled the Matter Engine will update in sync with the game step (set by Request Animation Frame). The delta value given to Matter is now controlled by the `getDelta` function.
* Matter Physics has a new method `step` which manually advances the physics simulation by one iteration, using whatever delta and correction values you pass in to it. When used in combination with `autoUpdate=false` you can now explicitly control the update frequency of the physics simulation and unbind it from the game step.
2018-03-27 15:15:05 +01:00
orblazer
f42f1bf132 Change structs for generic types 2018-03-23 16:54:12 +01:00
Richard Davey
574221d6cf A new property was added to Matter.World, correction which is used in the Engine.update call and allows you to adjust the time being passed to the simulation. The default value is 1 to remain consistent with previous releases. 2018-03-23 02:19:18 +00:00
Richard Davey
d78a9d097f eslint fixes 2018-03-22 13:22:23 +00:00
orblazer
ed1f2a7011 Fix wrong types 2018-03-22 13:51:30 +01:00
Richard Davey
32d9b82f93 Spacing 2018-03-21 17:22:09 +00:00
Richard Davey
0ef92e1172 Merge branch 'pr/3439' 2018-03-21 16:06:56 +00:00
Richard Davey
c6fc61e470 Fixed class names 2018-03-21 14:41:45 +00:00
Richard Davey
72690734c3 Fixed exposure 2018-03-21 14:41:34 +00:00
orblazer
11845f9d6d Fix "object" types on Physics and Math 2018-03-21 14:15:25 +01:00
Richard Davey
db613c793a Merge branch 'master' of https://github.com/photonstorm/phaser 2018-03-21 03:17:00 +00:00
Richard Davey
2f86100f87 MatterGameObject is a new function, available via the Matter Factory in this.matter.add.gameObject, that will inject a Matter JS Body into any Game Object, such as a Text object. 2018-03-21 03:16:36 +00:00
Richard Davey
5cae6d38b3 Matter.SetBody and SetExistingBody will now set the origin of the Game Object to be the Matter JS sprite.xOffset and yOffset values, which will auto-center the Game Object to the origin of the body, regardless of shape. 2018-03-21 03:16:01 +00:00
orblazer
7fba122321 Fix "any" types 2018-03-20 17:15:49 +01:00
orblazer
dca7996179 Fix multiple types on Physics, Texture and Input 2018-03-20 16:10:19 +01:00
orblazer
4cff464555 Fix nullable types 2018-03-20 15:36:03 +01:00
orblazer
fa13b597e3 Add more callbacks 2018-03-19 23:08:05 +01:00
orblazer
f30218d3d3 Add callbacks on Physics 2018-03-19 21:42:07 +01:00
Richard Davey
19a08286c0 More types added 2018-03-19 15:01:14 +00:00
Richard Davey
620bcc6ae5 jsdoc fixes and additions 2018-03-19 13:45:00 +00:00
orblazer
ae15eca7bd Update JSDoc on "Matter.JS" physics 2018-03-19 01:10:32 +01:00
orblazer
2da6a2bffe Update JSDoc on "Impact" physics 2018-03-19 00:42:09 +01:00
orblazer
af3c03a3cb Update JSDoc on "Arcade" physics 2018-03-19 00:29:46 +01:00
Richard Davey
edeb63ebbd eslint fix 2018-03-18 14:21:53 +00:00
Richard Davey
3d4be64331 Testing MatterGameObject 2018-03-17 18:07:05 +00:00
Richard Davey
05a4385cd7 jsdoc fixes 2018-03-16 17:29:39 +00:00
Richard Davey
a524dc44b0 Expose constants. Fix #3387 2018-03-16 13:29:30 +00:00
Richard Davey
7a8e4cf5e1
Merge pull request #3366 from samme/feature/world-wrap
Add Arcade.World wrap methods and Actions.WrapInRectangle
2018-03-16 12:58:16 +00:00
Sean Bohan
4cde28fecd Forgot to devide width by 2 2018-03-16 14:02:41 +08:00
Sean Bohan
72e82ecf48 Fix debug draw of scaled arcade body 2018-03-16 14:02:41 +08:00
samme
4b25574d82 Expect v3.3.0 2018-03-12 07:29:49 -07:00
samme
66e5a72dae Add Phaser.Physics.Arcade.World#wrap and friends
- Phaser.Physics.Arcade.World#wrap
- Phaser.Physics.Arcade.World#wrapArray
- Phaser.Physics.Arcade.World#wrapObject
2018-03-10 13:36:18 -08:00
Samid\Sami
f5e471dad7 removed trailing space for JSHint validation. 2018-03-08 11:46:01 +01:00
Samid\Sami
84481da4d1 * Fix #3345 by adding beginPath and closePath when done drawing in postUpdate. 2018-03-08 11:16:04 +01:00
Patrick Galbraith
8eb82e4fcb
Fix for collideGroupVsSelf is undefined
This happens when you call collide with a single group as the first param.

Seems like the `collideGroupVsSelf` function was not implemented. I've changed it to just call the `collideGroupVsGroup` with the first object twice which worked when I tested it on my project.
2018-03-05 21:15:38 +10:30
Sean Bohan
3f2e63fc17 Fix arcade body does not align with scaled parent object.
When a game object scaled, arcade body still calculate its position based on its original size instead of scaled one.
2018-03-01 09:02:04 +08:00
Richard Davey
1cae348300
Merge pull request #3278 from nkholski/arcadeGroups
Groups arcade collision
2018-02-28 20:56:11 +00:00
Richard Davey
218b4e4a52
Merge pull request #3285 from samme/docs/onWorldBounds
Describe Arcade.Body#onWorldBounds
2018-02-28 20:48:31 +00:00