@@ -7607,7 +7607,7 @@ module.exports = 'animationstop';
7607
7607
* The Animation Update Event.
7608
7608
*
7609
7609
* This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame.
7610
- * An animation will change frame based on the frme rate and other factors like `timeScale` and `delay`. It can also change
7610
+ * An animation will change frame based on the frame rate and other factors like `timeScale` and `delay`. It can also change
7611
7611
* frame when stopped or restarted.
7612
7612
*
7613
7613
* Listen for it on the Sprite using `sprite.on('animationupdate', listener)`
@@ -15679,7 +15679,7 @@ var CONST = {
15679
15679
* @type {string}
15680
15680
* @since 3.0.0
15681
15681
*/
15682
- VERSION: '3.60.0-beta.22 ',
15682
+ VERSION: '3.60.0-beta.23 ',
15683
15683
15684
15684
BlendModes: __webpack_require__(95723),
15685
15685
@@ -35178,11 +35178,11 @@ var SceneEvents = __webpack_require__(7599);
35178
35178
/**
35179
35179
* @classdesc
35180
35180
* The Game Object Creator is a Scene plugin that allows you to quickly create many common
35181
- * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically
35182
- * added to the Scene .
35181
+ * types of Game Objects and return them using a configuration object, rather than
35182
+ * having to specify a limited set of parameters such as with the GameObjectFactory .
35183
35183
*
35184
- * Game Objects directly register themselves with the Creator and inject their own creation
35185
- * methods into the class .
35184
+ * Game Objects made via this class are automatically added to the Scene and Update List
35185
+ * unless you explicitly set the `add` property in the configuration object to `false` .
35186
35186
*
35187
35187
* @class GameObjectCreator
35188
35188
* @memberof Phaser.GameObjects
@@ -41798,10 +41798,12 @@ var FX = new Class({
41798
41798
this.enabled = false;
41799
41799
41800
41800
/**
41801
- * An array containing all of the FX Controllers that
41801
+ * An array containing all of the Pre FX Controllers that
41802
41802
* have been added to this FX Component. They are processed in
41803
41803
* the order they are added.
41804
41804
*
41805
+ * This array is empty if this is a Post FX Component.
41806
+ *
41805
41807
* @name Phaser.GameObjects.Components.FX#list
41806
41808
* @type {Phaser.FX.Controller[]}
41807
41809
* @since 3.60.0
@@ -41894,13 +41896,20 @@ var FX = new Class({
41894
41896
*
41895
41897
* You can check the `enabled` property to see if the Game Object is already enabled, or not.
41896
41898
*
41899
+ * This only applies to Pre FX. Post FX are always enabled.
41900
+ *
41897
41901
* @method Phaser.GameObjects.Components.FX#enable
41898
41902
* @since 3.60.0
41899
41903
*
41900
41904
* @param {number} [padding=0] - The amount of padding to add to this Game Object.
41901
41905
*/
41902
41906
enable: function (padding)
41903
41907
{
41908
+ if (this.isPost)
41909
+ {
41910
+ return;
41911
+ }
41912
+
41904
41913
var renderer = this.gameObject.scene.sys.renderer;
41905
41914
41906
41915
if (renderer && renderer.pipelines)
@@ -41921,23 +41930,26 @@ var FX = new Class({
41921
41930
},
41922
41931
41923
41932
/**
41924
- * Destroys and removes all Pre and Post FX Controllers that are part of this FX Component,
41933
+ * Destroys and removes all FX Controllers that are part of this FX Component,
41925
41934
* then disables it.
41926
41935
*
41936
+ * If this is a Pre FX Component it will only remove Pre FX.
41937
+ * If this is a Post FX Component it will only remove Post FX.
41938
+ *
41939
+ * To remove both at once use the `GameObject.clearFX` method instead.
41940
+ *
41927
41941
* @method Phaser.GameObjects.Components.FX#clear
41928
41942
* @since 3.60.0
41929
41943
*
41930
- * @param {boolean} [removePre=true] - Should the Pre FX Controllers be removed?
41931
- * @param {boolean} [removePost=true] - Should the Post FX Controllers be removed?
41932
- *
41933
41944
* @return {this} This Game Object instance.
41934
41945
*/
41935
- clear: function (removePre, removePost )
41946
+ clear: function ()
41936
41947
{
41937
- if (removePre === undefined) { removePre = true; }
41938
- if (removePost === undefined) { removePost = true; }
41939
-
41940
- if (removePre)
41948
+ if (this.isPost)
41949
+ {
41950
+ this.gameObject.resetPostPipeline(true);
41951
+ }
41952
+ else
41941
41953
{
41942
41954
var list = this.list;
41943
41955
@@ -41949,11 +41961,6 @@ var FX = new Class({
41949
41961
this.list = [];
41950
41962
}
41951
41963
41952
- if (removePost)
41953
- {
41954
- this.gameObject.resetPostPipeline(true);
41955
- }
41956
-
41957
41964
this.enabled = false;
41958
41965
41959
41966
return this.gameObject;
@@ -41962,26 +41969,52 @@ var FX = new Class({
41962
41969
/**
41963
41970
* Searches for the given FX Controller within this FX Component.
41964
41971
*
41965
- * If found, the controller is removed from this compoent and then destroyed.
41972
+ * If found, the controller is removed from this component and then destroyed.
41966
41973
*
41967
41974
* @method Phaser.GameObjects.Components.FX#remove
41968
41975
* @since 3.60.0
41969
41976
*
41977
+ * @generic {Phaser.FX.Controller} T
41978
+ * @genericUse {T} - [fx]
41979
+ *
41970
41980
* @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.
41971
41981
*
41972
41982
* @return {this} This Game Object instance.
41973
41983
*/
41974
41984
remove: function (fx)
41975
41985
{
41976
- var list = this.list ;
41986
+ var i ;
41977
41987
41978
- for (var i = 0; i < list.length; i++ )
41988
+ if (this.isPost )
41979
41989
{
41980
- if (list[i] === fx)
41990
+ var pipelines = this.gameObject.getPostPipeline(fx.type);
41991
+
41992
+ for (i = 0; i < pipelines.length; i++)
41981
41993
{
41982
- SpliceOne(list, i);
41994
+ var pipeline = pipelines[i];
41995
+
41996
+ if (pipeline.controller === fx)
41997
+ {
41998
+ this.gameObject.removePostPipeline(pipeline);
41999
+
42000
+ fx.destroy();
41983
42001
41984
- fx.destroy();
42002
+ break;
42003
+ }
42004
+ }
42005
+ }
42006
+ else
42007
+ {
42008
+ var list = this.list;
42009
+
42010
+ for (i = 0; i < list.length; i++)
42011
+ {
42012
+ if (list[i] === fx)
42013
+ {
42014
+ SpliceOne(list, i);
42015
+
42016
+ fx.destroy();
42017
+ }
41985
42018
}
41986
42019
}
41987
42020
@@ -41994,22 +42027,25 @@ var FX = new Class({
41994
42027
* This will reset the pipeline on the Game Object that owns this component back to its
41995
42028
* default and flag this component as disabled.
41996
42029
*
41997
- * You can re-enable it again by calling `enable`.
42030
+ * You can re-enable it again by calling `enable` for Pre FX or by adding an FX for Post FX .
41998
42031
*
41999
- * Optionally, set `clear` to destroy all current Per and Post FX Controllers.
42032
+ * Optionally, set `clear` to destroy all current FX Controllers.
42000
42033
*
42001
42034
* @method Phaser.GameObjects.Components.FX#disable
42002
42035
* @since 3.60.0
42003
42036
*
42004
- * @param {boolean} [clear=false] - Destroy and remove all Pre and Post FX Controllers that are part of this FX Component .
42037
+ * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this component .
42005
42038
*
42006
42039
* @return {this} This Game Object instance.
42007
42040
*/
42008
42041
disable: function (clear)
42009
42042
{
42010
42043
if (clear === undefined) { clear = false; }
42011
42044
42012
- this.gameObject.resetPipeline();
42045
+ if (!this.isPost)
42046
+ {
42047
+ this.gameObject.resetPipeline();
42048
+ }
42013
42049
42014
42050
this.enabled = false;
42015
42051
@@ -42031,6 +42067,9 @@ var FX = new Class({
42031
42067
* @method Phaser.GameObjects.Components.FX#add
42032
42068
* @since 3.60.0
42033
42069
*
42070
+ * @generic {Phaser.FX.Controller} T
42071
+ * @genericUse {T} - [fx]
42072
+ *
42034
42073
* @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.
42035
42074
* @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.
42036
42075
*
@@ -44387,6 +44426,34 @@ var PostPipeline = {
44387
44426
44388
44427
this.hasPostPipeline = (this.postPipelines.length > 0);
44389
44428
44429
+ return this;
44430
+ },
44431
+
44432
+ /**
44433
+ * Removes all Pre and Post FX Controllers from this Game Object.
44434
+ *
44435
+ * If you wish to remove a single controller, use the `preFX.remove(fx)` or `postFX.remove(fx)` methods instead.
44436
+ *
44437
+ * If you wish to clear a single controller, use the `preFX.clear()` or `postFX.clear()` methods instead.
44438
+ *
44439
+ * @method Phaser.GameObjects.Components.PostPipeline#clearFX
44440
+ * @webglOnly
44441
+ * @since 3.60.0
44442
+ *
44443
+ * @return {this} This Game Object.
44444
+ */
44445
+ clearFX: function ()
44446
+ {
44447
+ if (this.preFX)
44448
+ {
44449
+ this.preFX.clear();
44450
+ }
44451
+
44452
+ if (this.postFX)
44453
+ {
44454
+ this.postFX.clear();
44455
+ }
44456
+
44390
44457
return this;
44391
44458
}
44392
44459
@@ -135162,7 +135229,7 @@ var MATH_CONST = {
135162
135229
/**
135163
135230
* The value of PI * 0.5.
135164
135231
*
135165
- * Yes, we undertstand that this should actually be PI * 2, but
135232
+ * Yes, we understand that this should actually be PI * 2, but
135166
135233
* it has been like this for so long we can't change it now.
135167
135234
* If you need PI * 2, use the PI2 constant instead.
135168
135235
*
@@ -138667,8 +138734,10 @@ var Image = __webpack_require__(1539);
138667
138734
* @extends Phaser.GameObjects.Components.Depth
138668
138735
* @extends Phaser.GameObjects.Components.Flip
138669
138736
* @extends Phaser.GameObjects.Components.GetBounds
138737
+ * @extends Phaser.GameObjects.Components.Mask
138670
138738
* @extends Phaser.GameObjects.Components.Origin
138671
138739
* @extends Phaser.GameObjects.Components.Pipeline
138740
+ * @extends Phaser.GameObjects.Components.PostPipeline
138672
138741
* @extends Phaser.GameObjects.Components.ScrollFactor
138673
138742
* @extends Phaser.GameObjects.Components.Size
138674
138743
* @extends Phaser.GameObjects.Components.Texture
@@ -139498,8 +139567,10 @@ var Sprite = __webpack_require__(13747);
139498
139567
* @extends Phaser.GameObjects.Components.Depth
139499
139568
* @extends Phaser.GameObjects.Components.Flip
139500
139569
* @extends Phaser.GameObjects.Components.GetBounds
139570
+ * @extends Phaser.GameObjects.Components.Mask
139501
139571
* @extends Phaser.GameObjects.Components.Origin
139502
139572
* @extends Phaser.GameObjects.Components.Pipeline
139573
+ * @extends Phaser.GameObjects.Components.PostPipeline
139503
139574
* @extends Phaser.GameObjects.Components.ScrollFactor
139504
139575
* @extends Phaser.GameObjects.Components.Size
139505
139576
* @extends Phaser.GameObjects.Components.Texture
@@ -183783,7 +183854,6 @@ var WebAudioSound = new Class({
183783
183854
{
183784
183855
if (this.isPlaying && this.spatialSource)
183785
183856
{
183786
-
183787
183857
var x = GetFastValue(this.spatialSource, 'x', null);
183788
183858
var y = GetFastValue(this.spatialSource, 'y', null);
183789
183859
@@ -183795,7 +183865,6 @@ var WebAudioSound = new Class({
183795
183865
{
183796
183866
this._spatialy = this.spatialNode.positionY.value = y;
183797
183867
}
183798
-
183799
183868
}
183800
183869
183801
183870
if (this.hasEnded)
@@ -197216,6 +197285,10 @@ var Tileset = __webpack_require__(47975);
197216
197285
* child called 'Layer 1'. In the Tilemap object, 'Layer 1' will have the name
197217
197286
* 'ParentGroup/Layer 1'.
197218
197287
*
197288
+ * The Phaser Tiled Parser does **not** support the 'Collection of Images' feature for a Tileset.
197289
+ * You must ensure all of your tiles are contained in a single tileset image file (per layer)
197290
+ * and have this 'embedded' in the exported Tiled JSON map data.
197291
+ *
197219
197292
* @class Tilemap
197220
197293
* @memberof Phaser.Tilemaps
197221
197294
* @constructor
@@ -197555,7 +197628,7 @@ var Tilemap = new Class({
197555
197628
if (tileMargin === undefined) { tileMargin = 0; }
197556
197629
if (tileSpacing === undefined) { tileSpacing = 0; }
197557
197630
if (gid === undefined) { gid = 0; }
197558
- if (tileOffset === undefined) { tileOffset = {x: 0, y: 0} }
197631
+ if (tileOffset === undefined) { tileOffset = { x: 0, y: 0 }; }
197559
197632
197560
197633
tileset = new Tileset(tilesetName, gid, tileWidth, tileHeight, tileMargin, tileSpacing, undefined, undefined, tileOffset);
197561
197634
@@ -201700,7 +201773,7 @@ var Vector2 = __webpack_require__(93736);
201700
201773
201701
201774
/**
201702
201775
* @classdesc
201703
- * A Tileset is a combination of an image containing the tiles and a container for data about
201776
+ * A Tileset is a combination of a single image containing the tiles and a container for data about
201704
201777
* each tile.
201705
201778
*
201706
201779
* @class Tileset
@@ -210379,6 +210452,16 @@ var Timeline = new Class({
210379
210452
/**
210380
210453
* Adds one or more events to this Timeline.
210381
210454
*
210455
+ * You can pass in a single configuration object, or an array of them:
210456
+ *
210457
+ * ```js
210458
+ * const timeline = this.add.timeline({
210459
+ * at: 1000,
210460
+ * run: () => {
210461
+ * this.add.sprite(400, 300, 'logo');
210462
+ * }
210463
+ * });
210464
+ * ```
210382
210465
*
210383
210466
* @method Phaser.Time.Timeline#add
210384
210467
* @since 3.60.0
@@ -216589,7 +216672,7 @@ var Tween = new Class({
216589
216672
* @method Phaser.GameObjects.GameObjectFactory#tween
216590
216673
* @since 3.0.0
216591
216674
*
216592
- * @param {Phaser.Types.Tweens.TweenBuilderConfig|object } config - The Tween configuration .
216675
+ * @param {Phaser.Types.Tweens.TweenBuilderConfig|Phaser.Types.Tweens.TweenChainBuilderConfig|Phaser.Tweens.Tween|Phaser.Tweens.TweenChain } config - A Tween Configuration object, or a Tween or TweenChain instance .
216593
216676
*
216594
216677
* @return {Phaser.Tweens.Tween} The Tween that was created.
216595
216678
*/
@@ -216606,7 +216689,7 @@ GameObjectFactory.register('tween', function (config)
216606
216689
* @method Phaser.GameObjects.GameObjectCreator#tween
216607
216690
* @since 3.0.0
216608
216691
*
216609
- * @param {Phaser.Types.Tweens.TweenBuilderConfig|object } config - The Tween configuration .
216692
+ * @param {Phaser.Types.Tweens.TweenBuilderConfig|Phaser.Types.Tweens.TweenChainBuilderConfig|Phaser.Tweens.Tween|Phaser.Tweens.TweenChain } config - A Tween Configuration object, or a Tween or TweenChain instance .
216610
216693
*
216611
216694
* @return {Phaser.Tweens.Tween} The Tween that was created.
216612
216695
*/
0 commit comments