Skip to content

Commit

Permalink
v3.60 Beta 23 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Apr 4, 2023
1 parent 4e18d35 commit 9a86f95
Show file tree
Hide file tree
Showing 9 changed files with 2,557 additions and 1,051 deletions.
159 changes: 121 additions & 38 deletions dist/phaser-arcade-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7607,7 +7607,7 @@ module.exports = 'animationstop';
* The Animation Update Event.
*
* This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame.
* An animation will change frame based on the frme rate and other factors like `timeScale` and `delay`. It can also change
* An animation will change frame based on the frame rate and other factors like `timeScale` and `delay`. It can also change
* frame when stopped or restarted.
*
* Listen for it on the Sprite using `sprite.on('animationupdate', listener)`
Expand Down Expand Up @@ -15679,7 +15679,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.60.0-beta.22',
VERSION: '3.60.0-beta.23',

BlendModes: __webpack_require__(95723),

Expand Down Expand Up @@ -35178,11 +35178,11 @@ var SceneEvents = __webpack_require__(7599);
/**
* @classdesc
* The Game Object Creator is a Scene plugin that allows you to quickly create many common
* types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically
* added to the Scene.
* types of Game Objects and return them using a configuration object, rather than
* having to specify a limited set of parameters such as with the GameObjectFactory.
*
* Game Objects directly register themselves with the Creator and inject their own creation
* methods into the class.
* Game Objects made via this class are automatically added to the Scene and Update List
* unless you explicitly set the `add` property in the configuration object to `false`.
*
* @class GameObjectCreator
* @memberof Phaser.GameObjects
Expand Down Expand Up @@ -41798,10 +41798,12 @@ var FX = new Class({
this.enabled = false;

/**
* An array containing all of the FX Controllers that
* An array containing all of the Pre FX Controllers that
* have been added to this FX Component. They are processed in
* the order they are added.
*
* This array is empty if this is a Post FX Component.
*
* @name Phaser.GameObjects.Components.FX#list
* @type {Phaser.FX.Controller[]}
* @since 3.60.0
Expand Down Expand Up @@ -41894,13 +41896,20 @@ var FX = new Class({
*
* You can check the `enabled` property to see if the Game Object is already enabled, or not.
*
* This only applies to Pre FX. Post FX are always enabled.
*
* @method Phaser.GameObjects.Components.FX#enable
* @since 3.60.0
*
* @param {number} [padding=0] - The amount of padding to add to this Game Object.
*/
enable: function (padding)
{
if (this.isPost)
{
return;
}

var renderer = this.gameObject.scene.sys.renderer;

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

/**
* Destroys and removes all Pre and Post FX Controllers that are part of this FX Component,
* Destroys and removes all FX Controllers that are part of this FX Component,
* then disables it.
*
* If this is a Pre FX Component it will only remove Pre FX.
* If this is a Post FX Component it will only remove Post FX.
*
* To remove both at once use the `GameObject.clearFX` method instead.
*
* @method Phaser.GameObjects.Components.FX#clear
* @since 3.60.0
*
* @param {boolean} [removePre=true] - Should the Pre FX Controllers be removed?
* @param {boolean} [removePost=true] - Should the Post FX Controllers be removed?
*
* @return {this} This Game Object instance.
*/
clear: function (removePre, removePost)
clear: function ()
{
if (removePre === undefined) { removePre = true; }
if (removePost === undefined) { removePost = true; }

if (removePre)
if (this.isPost)
{
this.gameObject.resetPostPipeline(true);
}
else
{
var list = this.list;

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

if (removePost)
{
this.gameObject.resetPostPipeline(true);
}

this.enabled = false;

return this.gameObject;
Expand All @@ -41962,26 +41969,52 @@ var FX = new Class({
/**
* Searches for the given FX Controller within this FX Component.
*
* If found, the controller is removed from this compoent and then destroyed.
* If found, the controller is removed from this component and then destroyed.
*
* @method Phaser.GameObjects.Components.FX#remove
* @since 3.60.0
*
* @generic {Phaser.FX.Controller} T
* @genericUse {T} - [fx]
*
* @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.
*
* @return {this} This Game Object instance.
*/
remove: function (fx)
{
var list = this.list;
var i;

for (var i = 0; i < list.length; i++)
if (this.isPost)
{
if (list[i] === fx)
var pipelines = this.gameObject.getPostPipeline(fx.type);

for (i = 0; i < pipelines.length; i++)
{
SpliceOne(list, i);
var pipeline = pipelines[i];

if (pipeline.controller === fx)
{
this.gameObject.removePostPipeline(pipeline);

fx.destroy();

fx.destroy();
break;
}
}
}
else
{
var list = this.list;

for (i = 0; i < list.length; i++)
{
if (list[i] === fx)
{
SpliceOne(list, i);

fx.destroy();
}
}
}

Expand All @@ -41994,22 +42027,25 @@ var FX = new Class({
* This will reset the pipeline on the Game Object that owns this component back to its
* default and flag this component as disabled.
*
* You can re-enable it again by calling `enable`.
* You can re-enable it again by calling `enable` for Pre FX or by adding an FX for Post FX.
*
* Optionally, set `clear` to destroy all current Per and Post FX Controllers.
* Optionally, set `clear` to destroy all current FX Controllers.
*
* @method Phaser.GameObjects.Components.FX#disable
* @since 3.60.0
*
* @param {boolean} [clear=false] - Destroy and remove all Pre and Post FX Controllers that are part of this FX Component.
* @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this component.
*
* @return {this} This Game Object instance.
*/
disable: function (clear)
{
if (clear === undefined) { clear = false; }

this.gameObject.resetPipeline();
if (!this.isPost)
{
this.gameObject.resetPipeline();
}

this.enabled = false;

Expand All @@ -42031,6 +42067,9 @@ var FX = new Class({
* @method Phaser.GameObjects.Components.FX#add
* @since 3.60.0
*
* @generic {Phaser.FX.Controller} T
* @genericUse {T} - [fx]
*
* @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.
* @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.
*
Expand Down Expand Up @@ -44387,6 +44426,34 @@ var PostPipeline = {

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

return this;
},

/**
* Removes all Pre and Post FX Controllers from this Game Object.
*
* If you wish to remove a single controller, use the `preFX.remove(fx)` or `postFX.remove(fx)` methods instead.
*
* If you wish to clear a single controller, use the `preFX.clear()` or `postFX.clear()` methods instead.
*
* @method Phaser.GameObjects.Components.PostPipeline#clearFX
* @webglOnly
* @since 3.60.0
*
* @return {this} This Game Object.
*/
clearFX: function ()
{
if (this.preFX)
{
this.preFX.clear();
}

if (this.postFX)
{
this.postFX.clear();
}

return this;
}

Expand Down Expand Up @@ -135162,7 +135229,7 @@ var MATH_CONST = {
/**
* The value of PI * 0.5.
*
* Yes, we undertstand that this should actually be PI * 2, but
* Yes, we understand that this should actually be PI * 2, but
* it has been like this for so long we can't change it now.
* If you need PI * 2, use the PI2 constant instead.
*
Expand Down Expand Up @@ -138667,8 +138734,10 @@ var Image = __webpack_require__(1539);
* @extends Phaser.GameObjects.Components.Depth
* @extends Phaser.GameObjects.Components.Flip
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.PostPipeline
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture
Expand Down Expand Up @@ -139498,8 +139567,10 @@ var Sprite = __webpack_require__(13747);
* @extends Phaser.GameObjects.Components.Depth
* @extends Phaser.GameObjects.Components.Flip
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.PostPipeline
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Size
* @extends Phaser.GameObjects.Components.Texture
Expand Down Expand Up @@ -183783,7 +183854,6 @@ var WebAudioSound = new Class({
{
if (this.isPlaying && this.spatialSource)
{

var x = GetFastValue(this.spatialSource, 'x', null);
var y = GetFastValue(this.spatialSource, 'y', null);

Expand All @@ -183795,7 +183865,6 @@ var WebAudioSound = new Class({
{
this._spatialy = this.spatialNode.positionY.value = y;
}

}

if (this.hasEnded)
Expand Down Expand Up @@ -197216,6 +197285,10 @@ var Tileset = __webpack_require__(47975);
* child called 'Layer 1'. In the Tilemap object, 'Layer 1' will have the name
* 'ParentGroup/Layer 1'.
*
* The Phaser Tiled Parser does **not** support the 'Collection of Images' feature for a Tileset.
* You must ensure all of your tiles are contained in a single tileset image file (per layer)
* and have this 'embedded' in the exported Tiled JSON map data.
*
* @class Tilemap
* @memberof Phaser.Tilemaps
* @constructor
Expand Down Expand Up @@ -197555,7 +197628,7 @@ var Tilemap = new Class({
if (tileMargin === undefined) { tileMargin = 0; }
if (tileSpacing === undefined) { tileSpacing = 0; }
if (gid === undefined) { gid = 0; }
if (tileOffset === undefined) { tileOffset = {x: 0, y: 0} }
if (tileOffset === undefined) { tileOffset = { x: 0, y: 0 }; }

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

Expand Down Expand Up @@ -201700,7 +201773,7 @@ var Vector2 = __webpack_require__(93736);

/**
* @classdesc
* A Tileset is a combination of an image containing the tiles and a container for data about
* A Tileset is a combination of a single image containing the tiles and a container for data about
* each tile.
*
* @class Tileset
Expand Down Expand Up @@ -210379,6 +210452,16 @@ var Timeline = new Class({
/**
* Adds one or more events to this Timeline.
*
* You can pass in a single configuration object, or an array of them:
*
* ```js
* const timeline = this.add.timeline({
* at: 1000,
* run: () => {
* this.add.sprite(400, 300, 'logo');
* }
* });
* ```
*
* @method Phaser.Time.Timeline#add
* @since 3.60.0
Expand Down Expand Up @@ -216589,7 +216672,7 @@ var Tween = new Class({
* @method Phaser.GameObjects.GameObjectFactory#tween
* @since 3.0.0
*
* @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.
* @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.
*
* @return {Phaser.Tweens.Tween} The Tween that was created.
*/
Expand All @@ -216606,7 +216689,7 @@ GameObjectFactory.register('tween', function (config)
* @method Phaser.GameObjects.GameObjectCreator#tween
* @since 3.0.0
*
* @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.
* @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.
*
* @return {Phaser.Tweens.Tween} The Tween that was created.
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/phaser-arcade-physics.min.js

Large diffs are not rendered by default.

0 comments on commit 9a86f95

Please sign in to comment.