Commit graph

4871 commits

Author SHA1 Message Date
Richard Davey
375db253f2 Quadratic Curve updates
* Quadratic Bezier Interpolation has been added to the Math.Interpolation functions
* A new Quadratic Bezier Curve class has been added, expanding the available Curve types
* Path.quadraticBezierTo allows you to add a Quadratic Bezier Curve into your Path.
2018-03-05 01:15:18 +00:00
Richard Davey
af8f8739ba
Merge pull request #3307 from RiCoTeRoX/curves-quadratic
Add quadraticBezier to API
2018-03-05 00:20:43 +00:00
Richard Davey
7d777f36e5
Merge pull request #3301 from migiyubi/fix-rnd
Fix RandomDataGenerator's randomness
2018-03-05 00:15:53 +00:00
danny
af3e47ce4b Fix on P0 vector 2018-03-02 20:16:11 -03:00
danny
db6039bf4f Add quadraticBezier to API 2018-03-02 17:42:12 -03:00
Richard Davey
95d85576c9 SceneManager.moveAbove and moveBelow added.
SceneManager.moveAbove will move a Scene to be directly above another Scene in the Scenes list. This is also exposed in the ScenePlugin.

SceneManager.moveBelow will move a Scene to be directly below another Scene in the Scenes list. This is also exposed in the ScenePlugin.
2018-03-02 18:25:44 +00:00
Richard Davey
7341d7a6cf Merge branch 'master' of https://github.com/photonstorm/phaser 2018-03-02 17:49:01 +00:00
Richard Davey
9a6e6265e8 The SceneManager no longer renders a Scene unless it is visible AND either running or paused. This now skips Scenes that are in an init state. 2018-03-02 17:48:45 +00:00
Richard Davey
a993251dea ScenePlugin.swapPosition now allows you to use it to swap the positions of any two Scenes. Before the change it only allowed you to swap the position of the calling Scene and another one, but a new optional keyB argument opens this up. 2018-03-02 17:47:01 +00:00
Richard Davey
4de9690f98 The setFrame method of the Texture component has been updated so that it will now automatically reset the width and height of a Game Object to match that of the new Frame. Related, it will also adjust the display origin values, because they are size based. If the Frame has a custom pivot it will set the origin to match the custom pivot instead. 2018-03-02 16:23:43 +00:00
Felipe Alfonso
865f0a604e Small fix on the MatrixStack rotation function 2018-03-02 11:29:04 -03:00
migiyubi
2f239de66a
Correct JSDoc 2018-03-02 19:35:01 +09:00
Richard Davey
98930de3a8 The SceneManager has a new method: remove which allows you to remove and destroy a Scene, freeing up the Scene key for use by future scenes and potentially clearing the Scene from active memory for gc. 2018-03-02 03:50:55 +00:00
migiyubi
fc1181970b
Fix RandomDataGenerator's randomness 2018-03-01 19:57:16 +09:00
Richard Davey
1f8d0c80f9 Fixed array access 2018-03-01 04:13:30 +00:00
Richard Davey
d8eeb3b760
Merge pull request #3300 from pixelpicosean/master
Bug fix: arcade body does not align with scaled parent object
2018-03-01 02:48:45 +00:00
Richard Davey
acc4922027 Fixes to the InputPlugin re: drop zones and addition of setInteractive argument. 2018-03-01 02:46:17 +00:00
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
ee42432c74 Texture.get has been optimized to fail first, then error, with a new falsey check. This allows you to skip out specifying animation frames in the animation config without generating a console warning. 2018-03-01 00:36:50 +00:00
Richard Davey
9a561ff385 Added roundPixels support to BitmapText canvas 2018-02-28 23:07:30 +00:00
Richard Davey
fdc1f3cab3 Added canvas roundPixels support for Text, Particles and TileSprites 2018-02-28 22:40:08 +00:00
Richard Davey
2c10ac328c Added roundPixels support for the Canvas renderer 2018-02-28 22:32:59 +00:00
Richard Davey
252a76f416 The Headless render mode has been implemented. You can now set HEADLESS as the renderType in the Game Config and it will run a special game step that skips rendering. It will still create a Canvas element, as lots of internal systems (like input) rely on it, but it will not draw anything to it. Fix #3256 2018-02-28 21:57:32 +00:00
Richard Davey
a223b35ccf Rectangle.top wouldn't reset the y position if the value given never exceed the Rectangles bottom. Fix #3290 (thanks @chancezeus) 2018-02-28 21:25:55 +00:00
Richard Davey
70eca02ce6 Merge branch 'master' of https://github.com/photonstorm/phaser 2018-02-28 21:15:22 +00:00
Richard Davey
3a1a9ea700 If you set transparent in the Game Config but didn't provide a backgroundColor then it would render as black. It will now be properly transparent. If you do provide a color value then it must include an alpha component. 2018-02-28 21:15:18 +00:00
Richard Davey
a89be7abc5 Tween.complete will allow you to flag a tween as being complete, no matter what stage it is at. If an onComplete callback has been defined it will be invoked. You can set an optional delay before this happens (thanks @Jerenaux for the idea)
Fix #3280
2018-02-28 21:14:56 +00:00
Richard Davey
1cae348300
Merge pull request #3278 from nkholski/arcadeGroups
Groups arcade collision
2018-02-28 20:56:11 +00:00
Richard Davey
de9cfb6ee2
Merge pull request #3234 from nkholski/master
load.plugin now accepts class as an argument besides an url-string
2018-02-28 20:50:32 +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
Richard Davey
63e5681073
Merge pull request #3287 from gaudeon/master
BugFix for ScenePlugin.launch, data now passed to queued scenes
2018-02-28 20:47:51 +00:00
srobertson421
66e881c7eb swapped queue loop to use _queue prop rather than queueLength var 2018-02-28 12:25:43 -08:00
Felipe Alfonso
14399d6910 TileSprite can now set frame of the pattern texture 2018-02-28 17:04:57 -03:00
Felipe Alfonso
4a103f91ad Merge branch 'master' of https://github.com/photonstorm/phaser 2018-02-28 15:08:35 -03:00
Felipe Alfonso
6a114fc07a Added roundPixels to the texture pipeline 2018-02-28 15:08:08 -03:00
Richard Davey
31f331de98 Added CameraManager.resize method. 2018-02-28 17:19:10 +00:00
Richard Davey
e6059f65cd SceneManager invokes resize method on all Systems. 2018-02-28 17:18:55 +00:00
Richard Davey
e44ce76214 Scene.Systems resize handler added. 2018-02-28 17:18:40 +00:00
Richard Davey
cf01056913 Game.resize now resizes the SceneManager and emits an event. 2018-02-28 17:18:25 +00:00
Richard Davey
c9d3c1a279 Added missing autoResize property to Game.Config 2018-02-28 17:17:37 +00:00
Richard Davey
550e53b81b Fixed InputManager.updateBounds so it factors in the document element position.
Also added `InputManager.resize` method, as the scale wouldn't ever be updated in the update loop if no interactive objects exist.
2018-02-28 14:27:28 +00:00
Richard Davey
d4d2b21d6c Added Game.resize to help with resizing the game config, renderer and input in one 2018-02-28 14:26:24 +00:00
Richard Davey
0144badd94 Added roundPixels boolean to config 2018-02-28 14:26:02 +00:00
Richard Davey
8ae3493296 setText updates
BitmapText.setText will check if the value given is falsey but not a zero and set to an empty string if so.
BitmapText.setText will now cast the given value to a string before setting.
BitmapText.setText will not change the text via `setText` unless the new text is different to the old one.
2018-02-27 15:14:03 +00:00
Richard Davey
b447665533 Text.setText will check if the value given is falsey but not a zero and set to an empty string if so. 2018-02-27 15:13:39 +00:00
Travis Chase
ca0366bfc8 launching a scene that is not running will now pass data through when start op is called for this scene in the scene process queue 2018-02-26 22:04:58 -07:00
Richard Davey
34e5a282d2 AnimationComponent.play now calls setSizeToFrame() and updateDisplayOrigin() on the parent Game Object in order to catch situations where you've started playing an animation on a Game Object that uses a different size to the previously set frame. 2018-02-27 01:09:09 +00:00
Richard Davey
921d7e317a Arcade Physics Bodies didn't apply the results of allowRotation to the parent Game Object. 2018-02-27 01:08:55 +00:00
samme
36d91e9955 Describe Arcade.Body#onWorldBounds 2018-02-26 11:27:57 -08:00
Niklas Berg
b87d71ab73 single out groups without physics 2018-02-24 08:44:38 +01:00