Commit graph

89 commits

Author SHA1 Message Date
Richard Davey
a5132b2342 Call addedToScene and removedFromScene
* `Container.addHandler` will now call `GameObject.addedToScene`.
* `Container.removeHandler` will now call `GameObject.removedFromScene`.
2022-06-07 16:44:26 +01:00
Richard Davey
59fbcc5ca3 Updated copyright year 2022-02-28 14:29:51 +00:00
Vladislav Forsh
7a636379f5 Fix pointToContainer issue with output parameter
provided `output` parameter was ignored when the container didn't have a parent container (was attached directly to the scene)

(cherry picked from commit 0d97dcc1f844f528f2361bfd800dec4885c5edc1)
2022-01-06 13:07:16 +03:00
Richard Davey
45ccff26e1 Fixed jsdoc name 2021-05-24 17:33:01 +01:00
Rex
62ea171971 Add MoveAbove, MoveBelow methods of List structure
MoveAbove: Moves the given array element above another one in the array.
MoveBelow: Moves the given array element below another one in the array.
2021-04-26 15:17:42 +08:00
Richard Davey
e9da34e39f Docs update. Fix #5604 2021-03-24 16:30:33 +00:00
Richard Davey
bd9fbfe077 Adding a Game Object to a Container that already existed in another Container would leave a copy of it on the Display List 2021-03-24 15:39:30 +00:00
Richard Davey
e2f19617f3 3.53.1 Release 2021-03-08 16:37:16 +00:00
Richard Davey
27806dad9c Container.addHandler will now use the new addToDisplayList and removeFromDisplayList Game Object methods. 2021-03-03 18:00:34 +00:00
Richard Davey
00d8b6a009 Invoke camera.addToRenderList method 2021-01-07 12:31:31 +00:00
Richard Davey
3154bf2e6f Update Container.js 2020-12-07 13:11:49 +00:00
Richard Davey
02c34cd64e Replace integer with number 2020-11-23 10:22:13 +00:00
Richard Davey
fb47d2f9e8 Added Pipeline component 2020-11-05 10:18:53 +00:00
Richard Davey
ce69c22e86 Added new private forcePipeline property and pipeline methods 2020-10-29 17:22:04 +00:00
Richard Davey
0e72b3d3a0 Container doesn't need to be on the updateList, so remove the handler. 2020-09-30 09:20:16 +01:00
Richard Davey
24de03ca96 Added missing ADDED_TO_SCENE handlers 2020-09-29 20:14:30 +01:00
Richard Davey
3969d6e45a Updated JSDocs to cover situation in #3858 2020-09-11 10:08:22 +01:00
Richard Davey
8f8a90bedd Utils.Array.StableSort has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The inplace function has been removed, just call StableSort(array) directly now. All classes that used StableSort.inplace have been updated to call it directly. 2020-09-02 12:24:27 +01:00
Richard Davey
157be83f7c The Container will now test to see if any Game Object added to it is already on the display list, or not, and emit its ADDED and REMOVED events accordingly. Fix #5267 #3876 2020-08-24 19:26:19 +01:00
Richard Davey
b6fd158986 Container.getBounds will no longer set the temp rect bounds to the first child of the Container by default (which would error if the child had no bounds, like a Graphics object) and instead sets it as it iterates the children 2020-07-13 12:12:28 +01:00
Richard Davey
7525ed2533 Updated docs 2020-04-27 15:09:37 +01:00
Richard Davey
91e8d331c6 lint fixes 2020-04-27 13:03:55 +01:00
Godard
9c2447dcb8 fix Container pointToContainer function 2020-04-09 12:02:31 -04:00
Eliot Godard
f4ba7c4e3a Fix wrong Container.getBounds with child container 2020-03-12 01:42:17 -04:00
Jason Kwok
91f1fefd2b Fixed this return types for Phaser.GameObjects.Container 2020-01-26 20:50:59 +08:00
Richard Davey
ff65e69cd1 Changed copyright date to 2020 2020-01-15 12:07:09 +00:00
Richard Davey
f0e7a9bcf9 The Container Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 2019-12-28 17:27:31 +00:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
f4a86fd368 The Container.setScrollFactor method has a new optional argument updateChildren. If set, it will change the scrollFactor values of all the Container children as well as the Container. Fix #4466 #4475 2019-04-24 12:09:16 +01:00
Richard Davey
fac2efedc4 Container + List.sort scope fixed and custom handler option added. Fix #4241 2019-01-24 11:04:36 +00:00
Richard Davey
36d86abd48 Added Camera Fade and Game Object Destroy events. 2019-01-18 14:21:45 +00:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
J.C
f09e777f84 1, GetFirstElement -> should be GetFirst
2, doc fix
2018-12-20 11:11:56 +08: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
e94d92518d GameObjects added to and removed from Containers no longer listen for the shutdown event at all 2018-09-25 15:00:23 +01:00
Richard Davey
91f7e27ae8 Transform.getWorldTransformMatrix has been recoded to iterate the transform parents correctly, applying the matrix multiplications as it goes. This (along with some changes in the Input Manager) fix the issue with Game Objects inside of Containers failing hit tests between certain angles. Fix #3920 2018-08-29 16:10:48 +01:00
Richard Davey
198f353c9a The default Container Blend Mode is now SKIP_TEST. This allows you to either set a blend mode for a Container, in which case all children use that blend mode. Or, you can set a blend mode on the children and the children will render using their own blend modes, as the Container doesn't have one set. The WebGL and Canvas Renderer functions have also been updated to support this change. Fix #3684 2018-08-21 22:07:35 +01:00
Richard Davey
f97ce72e16 Added the Mask compontent to Container. It worked without it, but this brings it in-line with the documentation and other Game Objects. Fix #3797 2018-06-28 14:17:04 +01:00
Chris Andrew
124b0ff773 Documented Light, LightsManager and LightsPlugin.
Documented class description for TransformMatrix.

Added a missing description from Container's EachContainerCallback.
2018-06-13 18:44:32 +01:00
Chris Andrew
ab5853f65e Started documenting the Graphics game object.
Added a couple of missing descriptions for the Container game object.
2018-06-06 17:52:31 +01:00
Richard Davey
30678b44ff Updated method names 2018-05-23 23:09:31 +01:00
Richard Davey
457ab68ef4 Container updated to use preDestroy and remove event hooks 2018-05-22 16:02:28 +01:00
Richard Davey
26faa58ad7 Corrected an error in Container.getBoundsTransformMatrix that called a missing method, causing a getBounds on a nested container to fail. Fix #3624 2018-05-15 16:23:33 +01:00
Richard Davey
9fa74400ab Container.getBounds now checks if it can call getBounds on its children before doing so, as some do not have this method (such as Graphics objects) so they no longer cause the call to crash. Fix #3623 2018-04-30 12:28:26 +01:00
Richard Davey
cfc4528370 Containers no longer in beta. 2018-04-19 14:35:17 +01:00
Richard Davey
6b2307594a Scene plugin flow overhaul
Every Plugin has been updated to correctly follow the same flow through the Scene lifecycle. Instead of listening for the Scene 'boot' event, which is only dispatched once (when the Scene is first created), they will now listen for the Scene 'start' event, which occurs every time the Scene is started. All plugins now consistently follow the same Shutdown and Destroy patterns too, meaning they tidy-up after themselves on a shutdown, not just a destroy. Overall, this change means that there should be less issues when returning to previously closed Scenes, as the plugins will restart themselves properly.
2018-04-13 17:12:17 +01:00
Richard Davey
703f04025b Added warning to docs 2018-04-12 22:49:02 +01:00
Richard Davey
f13bbca9c3 Fix getWorldBounds clash 2018-04-12 14:25:46 +01:00
Richard Davey
38626f8556 Added originX/Y properties. Fix #3545 2018-04-11 21:07:41 +01:00