Commit graph

130 commits

Author SHA1 Message Date
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
Richard Davey
933e193ccf Group.destroy has a new optional argument destroyChildren which will automatically call destroy on all children of a Group if set to true (the default is false, hence it doesn't change the public API). Fix #3246 2018-03-27 01:09:30 +01:00
Samid\Sami
74d43b2707 update changelog 2018-03-25 10:51:47 +02:00
Richard Davey
2cd7da0126 The RenderTexture now uses the ComputedSize component instead of Size (which requires a frame), allowing calls to getBounds to work. Fix #3451 2018-03-23 10:00:25 +00: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
889014e409 Updated change log 2018-03-22 15:09:01 +00:00
Richard Davey
6fe6a165be Preparing for 3.3.1 2018-03-22 14:39:29 +00:00
Richard Davey
a03b60193c Updated log and readme 2018-03-22 13:27:12 +00:00
Richard Davey
c0ec42dc2b Added setRate, setDetune and renamed setRate to calculateRate 2018-03-21 16:43:08 +00:00
Richard Davey
2433844cd3 Added setVolume and setMute 2018-03-21 14:54:23 +00:00
Richard Davey
645c03f2e9 Added setRate and setDetune methods 2018-03-21 14:40:07 +00:00
Richard Davey
3f0ee709f0 Renamed methods to avoid confliction with Animation component 2018-03-21 14:09:30 +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
Richard Davey
d329724ae5 Added the ComputedSize component to the Text Game Object, which allows Text.getBounds, and related methods, to work again instead of returning NaN. 2018-03-20 19:00:48 +00:00
Richard Davey
b6f2c80ae6 Groups will now listen for a destroy event from any Game Object added to them, and if received will automatically remove that GameObject from the Group. Fix #3418 2018-03-20 01:08:45 +00:00
Richard Davey
cb5b12e9d3 The GameObject destroy event is now emitted at the start of the destroy process, before things like the body or input managers have been removed, so you're able to use the event handler to extract any information you require from the GameObject before it's actually disposed of. Previously, the event was dispatched at the very end of the process. 2018-03-20 01:05:53 +00:00
Richard Davey
07ec73774b Updated change log 2018-03-20 00:36:33 +00:00
Richard Davey
64fdbc3040 Graphics.alpha was being ignored in the WebGL renderer and is now applied properly to strokes and fills. Fix #3426 2018-03-20 00:27:39 +00:00
Richard Davey
75bb9d92a9 Camera.fadeIn is a new method that will fade the camera in from a given color (black by default) and then optionally invoke a callback. This is the same as using Camera.flash but with an easier to grok method name. Fix #3412 2018-03-20 00:10:55 +00:00
Richard Davey
490aa2838d Updated change log 2018-03-19 23:32:36 +00:00
Richard Davey
968dc05eae Triangle.getLineA/B/C now returns a Line instead of an untyped object. It also now has an optional argument that allows you to pass a Line in to be populated, rather than creating a new one. 2018-03-19 16:51:39 +00:00
Richard Davey
917dc8f8be Rectangle.getLineA/B/C/D now returns a Line instead of an untyped object. It also now has an optional argument that allows you to pass a Line in to be populated, rather than creating a new one. 2018-03-19 16:47:34 +00:00
Richard Davey
034161bd66 Line.getPointA and Line.getPointB now return Vector2 instances instead of un-typed objects. 2018-03-19 16:34:22 +00:00
Richard Davey
6c5e1ba15e Updated change log 2018-03-17 17:51:51 +00:00
Richard Davey
4a9f46c0c0 Updated change log 2018-03-17 17:51:34 +00:00
Richard Davey
ccbf399dc2 Actions.GetLast will return the last element in the items array matching the conditions. 2018-03-17 17:16:11 +00:00
Richard Davey
46e9dbd05a Fixed left / right rotation and exposed via namespace
Phaser.Utils.Array.Matrix.RotateLeft actually rotated to the right (thanks @Tomas2h)
Phaser.Utils.Array.Matrix.RotateRight actually rotated to the left (thanks @Tomas2h)
2018-03-17 17:03:15 +00:00
Richard Davey
b2d062b0bd LoaderPlugin.progress and the corresponding event now factor in both the list size and the inflight size when calculating the percentage complete. Fix #3384 2018-03-16 15:01:39 +00:00
Richard Davey
b6b03b85bd The InputPlugin.processOverOutEvents method wasn't correctly working out the total of the number of objects interacted with, which caused input events to be disabled in Scenes further down the scene list if something was being dragged in an upper scene. Fix #3399 2018-03-16 14:57:19 +00:00
Richard Davey
4ab98eb492 The TweenManager will now check the state of a tween before playing it. If not in a pending state it will be skipped. This allows you to stop a tween immediately after creating it and not have it play through once anyway. Fix #3405 2018-03-16 14:31:49 +00:00
Richard Davey
a524dc44b0 Expose constants. Fix #3387 2018-03-16 13:29:30 +00:00
Richard Davey
a7b8d754d6 Updated change log 2018-03-16 13:10:47 +00:00
Richard Davey
ee1e4f1e90 InputManager.hitTest will now factor the game resolution into account, stopping the tests from being offset if resolution didn't equal 1. #3376 2018-03-16 12:49:02 +00:00
Richard Davey
aa8a4524b6 Updated log 2018-03-16 12:39:01 +00:00
Richard Davey
36f5ca47a9 Added new config values
* Game.Config.preserveDrawingBuffer is now passed to the WebGL Renderer (default `false`).
* Game.Config.failIfMajorPerformanceCaveat is now passed to the WebGL Renderer (default `false`).
* Game.Config.powerPreference is now passed to the WebGL Renderer (default `default`).
* Game.Config.pixelArt is now passed to the WebGL Renderer as the antialias context property (default `false`).
2018-03-15 21:15:12 +00:00
Richard Davey
00a5ce9a03 Preparing for 3.3.0 2018-03-13 13:21:34 +00:00
Richard Davey
1de47dfe1b Updated change log 2018-03-12 16:38:28 +00:00
Richard Davey
247e8b9337 Text.setFixedSize was incorrectly setting the text property instead of the parent property. Fix #3375 2018-03-12 16:34:21 +00:00
Richard Davey
036bb2d17b Updated change log 2018-03-12 16:30:01 +00:00
Richard Davey
046e47aa38 Updated 2018-03-12 16:13:07 +00:00
Richard Davey
0368473b95 The SetFrame method now has two optional arguments: updateSize and updateOrigin (both true by default) which will update the size and origin of the Game Object respectively. Fix #3339 2018-03-12 14:45:18 +00:00
Richard Davey
33cbb067b4 Phaser.Display.Color.Interpolate would return NaN values because it was loading the wrong Linear function. Fix #3372 2018-03-12 13:41:09 +00:00
Richard Davey
edf1aa7cc1 The onContextRestored callback won't be defined any more unless the WebGL Renderer is in use in the following objects: BitmapMask, Static Tilemap, TileSprite and Text. This should allow those objects to now work in HEADLESS mode. Fix #3368 2018-03-12 13:37:13 +00:00
Richard Davey
063d30602e The ForwardDiffuseLightPipeline now uses sys.lights instead of the Scene variable to avoid errors due to injection removal. 2018-03-12 12:55:09 +00:00
Richard Davey
bc88401dff Updated change log 2018-03-12 12:08:49 +00:00
Richard Davey
935a89342d Calling setText on a BitmapText object will now recalculate its display origin values. Fix #3350 2018-03-09 17:08:12 +00:00
Richard Davey
9203d3b7a7 Updated change log 2018-03-09 16:30:26 +00:00
Richard Davey
852e74721f
Merge branch 'master' into master 2018-03-09 15:44:19 +00:00
Richard Davey
ef66eef129 Updated change log 2018-03-09 15:42:20 +00:00
Richard Davey
db3112de31 The SceneManager.render will now render a Scene as long as it's in a LOADING state or higher. Before it would only render RUNNING scenes, but this precluded those that were loading assets. 2018-03-09 15:33:07 +00:00