Skip to content

Commit 9a86f95

Browse files
committed
v3.60 Beta 23 Release
1 parent 4e18d35 commit 9a86f95

9 files changed

+2557
-1051
lines changed

dist/phaser-arcade-physics.js

+121-38
Original file line numberDiff line numberDiff line change
@@ -7607,7 +7607,7 @@ module.exports = 'animationstop';
76077607
* The Animation Update Event.
76087608
*
76097609
* 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
76117611
* frame when stopped or restarted.
76127612
*
76137613
* Listen for it on the Sprite using `sprite.on('animationupdate', listener)`
@@ -15679,7 +15679,7 @@ var CONST = {
1567915679
* @type {string}
1568015680
* @since 3.0.0
1568115681
*/
15682-
VERSION: '3.60.0-beta.22',
15682+
VERSION: '3.60.0-beta.23',
1568315683

1568415684
BlendModes: __webpack_require__(95723),
1568515685

@@ -35178,11 +35178,11 @@ var SceneEvents = __webpack_require__(7599);
3517835178
/**
3517935179
* @classdesc
3518035180
* 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.
3518335183
*
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`.
3518635186
*
3518735187
* @class GameObjectCreator
3518835188
* @memberof Phaser.GameObjects
@@ -41798,10 +41798,12 @@ var FX = new Class({
4179841798
this.enabled = false;
4179941799

4180041800
/**
41801-
* An array containing all of the FX Controllers that
41801+
* An array containing all of the Pre FX Controllers that
4180241802
* have been added to this FX Component. They are processed in
4180341803
* the order they are added.
4180441804
*
41805+
* This array is empty if this is a Post FX Component.
41806+
*
4180541807
* @name Phaser.GameObjects.Components.FX#list
4180641808
* @type {Phaser.FX.Controller[]}
4180741809
* @since 3.60.0
@@ -41894,13 +41896,20 @@ var FX = new Class({
4189441896
*
4189541897
* You can check the `enabled` property to see if the Game Object is already enabled, or not.
4189641898
*
41899+
* This only applies to Pre FX. Post FX are always enabled.
41900+
*
4189741901
* @method Phaser.GameObjects.Components.FX#enable
4189841902
* @since 3.60.0
4189941903
*
4190041904
* @param {number} [padding=0] - The amount of padding to add to this Game Object.
4190141905
*/
4190241906
enable: function (padding)
4190341907
{
41908+
if (this.isPost)
41909+
{
41910+
return;
41911+
}
41912+
4190441913
var renderer = this.gameObject.scene.sys.renderer;
4190541914

4190641915
if (renderer && renderer.pipelines)
@@ -41921,23 +41930,26 @@ var FX = new Class({
4192141930
},
4192241931

4192341932
/**
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,
4192541934
* then disables it.
4192641935
*
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+
*
4192741941
* @method Phaser.GameObjects.Components.FX#clear
4192841942
* @since 3.60.0
4192941943
*
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-
*
4193341944
* @return {this} This Game Object instance.
4193441945
*/
41935-
clear: function (removePre, removePost)
41946+
clear: function ()
4193641947
{
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
4194141953
{
4194241954
var list = this.list;
4194341955

@@ -41949,11 +41961,6 @@ var FX = new Class({
4194941961
this.list = [];
4195041962
}
4195141963

41952-
if (removePost)
41953-
{
41954-
this.gameObject.resetPostPipeline(true);
41955-
}
41956-
4195741964
this.enabled = false;
4195841965

4195941966
return this.gameObject;
@@ -41962,26 +41969,52 @@ var FX = new Class({
4196241969
/**
4196341970
* Searches for the given FX Controller within this FX Component.
4196441971
*
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.
4196641973
*
4196741974
* @method Phaser.GameObjects.Components.FX#remove
4196841975
* @since 3.60.0
4196941976
*
41977+
* @generic {Phaser.FX.Controller} T
41978+
* @genericUse {T} - [fx]
41979+
*
4197041980
* @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.
4197141981
*
4197241982
* @return {this} This Game Object instance.
4197341983
*/
4197441984
remove: function (fx)
4197541985
{
41976-
var list = this.list;
41986+
var i;
4197741987

41978-
for (var i = 0; i < list.length; i++)
41988+
if (this.isPost)
4197941989
{
41980-
if (list[i] === fx)
41990+
var pipelines = this.gameObject.getPostPipeline(fx.type);
41991+
41992+
for (i = 0; i < pipelines.length; i++)
4198141993
{
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();
4198342001

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+
}
4198542018
}
4198642019
}
4198742020

@@ -41994,22 +42027,25 @@ var FX = new Class({
4199442027
* This will reset the pipeline on the Game Object that owns this component back to its
4199542028
* default and flag this component as disabled.
4199642029
*
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.
4199842031
*
41999-
* Optionally, set `clear` to destroy all current Per and Post FX Controllers.
42032+
* Optionally, set `clear` to destroy all current FX Controllers.
4200042033
*
4200142034
* @method Phaser.GameObjects.Components.FX#disable
4200242035
* @since 3.60.0
4200342036
*
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.
4200542038
*
4200642039
* @return {this} This Game Object instance.
4200742040
*/
4200842041
disable: function (clear)
4200942042
{
4201042043
if (clear === undefined) { clear = false; }
4201142044

42012-
this.gameObject.resetPipeline();
42045+
if (!this.isPost)
42046+
{
42047+
this.gameObject.resetPipeline();
42048+
}
4201342049

4201442050
this.enabled = false;
4201542051

@@ -42031,6 +42067,9 @@ var FX = new Class({
4203142067
* @method Phaser.GameObjects.Components.FX#add
4203242068
* @since 3.60.0
4203342069
*
42070+
* @generic {Phaser.FX.Controller} T
42071+
* @genericUse {T} - [fx]
42072+
*
4203442073
* @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.
4203542074
* @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.
4203642075
*
@@ -44387,6 +44426,34 @@ var PostPipeline = {
4438744426

4438844427
this.hasPostPipeline = (this.postPipelines.length > 0);
4438944428

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+
4439044457
return this;
4439144458
}
4439244459

@@ -135162,7 +135229,7 @@ var MATH_CONST = {
135162135229
/**
135163135230
* The value of PI * 0.5.
135164135231
*
135165-
* Yes, we undertstand that this should actually be PI * 2, but
135232+
* Yes, we understand that this should actually be PI * 2, but
135166135233
* it has been like this for so long we can't change it now.
135167135234
* If you need PI * 2, use the PI2 constant instead.
135168135235
*
@@ -138667,8 +138734,10 @@ var Image = __webpack_require__(1539);
138667138734
* @extends Phaser.GameObjects.Components.Depth
138668138735
* @extends Phaser.GameObjects.Components.Flip
138669138736
* @extends Phaser.GameObjects.Components.GetBounds
138737+
* @extends Phaser.GameObjects.Components.Mask
138670138738
* @extends Phaser.GameObjects.Components.Origin
138671138739
* @extends Phaser.GameObjects.Components.Pipeline
138740+
* @extends Phaser.GameObjects.Components.PostPipeline
138672138741
* @extends Phaser.GameObjects.Components.ScrollFactor
138673138742
* @extends Phaser.GameObjects.Components.Size
138674138743
* @extends Phaser.GameObjects.Components.Texture
@@ -139498,8 +139567,10 @@ var Sprite = __webpack_require__(13747);
139498139567
* @extends Phaser.GameObjects.Components.Depth
139499139568
* @extends Phaser.GameObjects.Components.Flip
139500139569
* @extends Phaser.GameObjects.Components.GetBounds
139570+
* @extends Phaser.GameObjects.Components.Mask
139501139571
* @extends Phaser.GameObjects.Components.Origin
139502139572
* @extends Phaser.GameObjects.Components.Pipeline
139573+
* @extends Phaser.GameObjects.Components.PostPipeline
139503139574
* @extends Phaser.GameObjects.Components.ScrollFactor
139504139575
* @extends Phaser.GameObjects.Components.Size
139505139576
* @extends Phaser.GameObjects.Components.Texture
@@ -183783,7 +183854,6 @@ var WebAudioSound = new Class({
183783183854
{
183784183855
if (this.isPlaying && this.spatialSource)
183785183856
{
183786-
183787183857
var x = GetFastValue(this.spatialSource, 'x', null);
183788183858
var y = GetFastValue(this.spatialSource, 'y', null);
183789183859

@@ -183795,7 +183865,6 @@ var WebAudioSound = new Class({
183795183865
{
183796183866
this._spatialy = this.spatialNode.positionY.value = y;
183797183867
}
183798-
183799183868
}
183800183869

183801183870
if (this.hasEnded)
@@ -197216,6 +197285,10 @@ var Tileset = __webpack_require__(47975);
197216197285
* child called 'Layer 1'. In the Tilemap object, 'Layer 1' will have the name
197217197286
* 'ParentGroup/Layer 1'.
197218197287
*
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+
*
197219197292
* @class Tilemap
197220197293
* @memberof Phaser.Tilemaps
197221197294
* @constructor
@@ -197555,7 +197628,7 @@ var Tilemap = new Class({
197555197628
if (tileMargin === undefined) { tileMargin = 0; }
197556197629
if (tileSpacing === undefined) { tileSpacing = 0; }
197557197630
if (gid === undefined) { gid = 0; }
197558-
if (tileOffset === undefined) { tileOffset = {x: 0, y: 0} }
197631+
if (tileOffset === undefined) { tileOffset = { x: 0, y: 0 }; }
197559197632

197560197633
tileset = new Tileset(tilesetName, gid, tileWidth, tileHeight, tileMargin, tileSpacing, undefined, undefined, tileOffset);
197561197634

@@ -201700,7 +201773,7 @@ var Vector2 = __webpack_require__(93736);
201700201773

201701201774
/**
201702201775
* @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
201704201777
* each tile.
201705201778
*
201706201779
* @class Tileset
@@ -210379,6 +210452,16 @@ var Timeline = new Class({
210379210452
/**
210380210453
* Adds one or more events to this Timeline.
210381210454
*
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+
* ```
210382210465
*
210383210466
* @method Phaser.Time.Timeline#add
210384210467
* @since 3.60.0
@@ -216589,7 +216672,7 @@ var Tween = new Class({
216589216672
* @method Phaser.GameObjects.GameObjectFactory#tween
216590216673
* @since 3.0.0
216591216674
*
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.
216593216676
*
216594216677
* @return {Phaser.Tweens.Tween} The Tween that was created.
216595216678
*/
@@ -216606,7 +216689,7 @@ GameObjectFactory.register('tween', function (config)
216606216689
* @method Phaser.GameObjects.GameObjectCreator#tween
216607216690
* @since 3.0.0
216608216691
*
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.
216610216693
*
216611216694
* @return {Phaser.Tweens.Tween} The Tween that was created.
216612216695
*/

dist/phaser-arcade-physics.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)