Skip to content

Commit 41be1e4

Browse files
committed
4.2.1
1 parent 4eced25 commit 41be1e4

7 files changed

Lines changed: 32857 additions & 32871 deletions

File tree

dist/phaser-arcade-physics.js

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5722,7 +5722,7 @@ var AnimationManager = new Class({
57225722
*
57235723
* @param {string} key - The key of the Animation to retrieve.
57245724
*
5725-
* @return {Phaser.Animations.Animation} The Animation.
5725+
* @return {(Phaser.Animations.Animation|undefined)} The Animation or `undefined`.
57265726
*/
57275727
get: function (key)
57285728
{
@@ -16466,7 +16466,7 @@ var CONST = {
1646616466
* @type {string}
1646716467
* @since 3.0.0
1646816468
*/
16469-
VERSION: '4.2.0',
16469+
VERSION: '4.2.1',
1647016470

1647116471
/**
1647216472
* Phaser Release Version as displayed in the console.log header URL.
@@ -16476,7 +16476,7 @@ var CONST = {
1647616476
* @type {string}
1647716477
* @since 3.87.0
1647816478
*/
16479-
LOG_VERSION: 'v402',
16479+
LOG_VERSION: 'v4021',
1648016480

1648116481
BlendModes: __webpack_require__(10312),
1648216482

@@ -33834,6 +33834,7 @@ module.exports = ColorMatrix;
3383433834
var Class = __webpack_require__(83419);
3383533835
var Controller = __webpack_require__(13045);
3383633836
var ColorMatrix = __webpack_require__(89422);
33837+
var Texture = __webpack_require__(79237);
3383733838

3383833839
/**
3383933840
* @classdesc
@@ -33946,7 +33947,7 @@ var CombineColorMatrix = new Class({
3394633947
*/
3394733948
setTexture: function (texture)
3394833949
{
33949-
var phaserTexture = texture instanceof Phaser.Textures.Texture ? texture : this.camera.scene.sys.textures.getFrame(texture);
33950+
var phaserTexture = texture instanceof Texture ? texture : this.camera.scene.sys.textures.getFrame(texture);
3395033951

3395133952
if (phaserTexture)
3395233953
{
@@ -34849,6 +34850,7 @@ var Class = __webpack_require__(83419);
3484934850
var Controller = __webpack_require__(13045);
3485034851
var Matrix4 = __webpack_require__(37867);
3485134852
var TransformMatrix = __webpack_require__(61340);
34853+
var Texture = __webpack_require__(79237);
3485234854

3485334855
/**
3485434856
* @classdesc
@@ -35010,7 +35012,7 @@ var ImageLight = new Class({
3501035012
*/
3501135013
setEnvironmentMap: function (texture)
3501235014
{
35013-
var phaserTexture = texture instanceof Phaser.Textures.Texture ? texture : this.camera.scene.sys.textures.getFrame(texture);
35015+
var phaserTexture = texture instanceof Texture ? texture : this.camera.scene.sys.textures.getFrame(texture);
3501435016

3501535017
if (phaserTexture)
3501635018
{
@@ -35031,7 +35033,7 @@ var ImageLight = new Class({
3503135033
*/
3503235034
setNormalMap: function (texture)
3503335035
{
35034-
var phaserTexture = texture instanceof Phaser.Textures.Texture ? texture : this.camera.scene.sys.textures.getFrame(texture);
35036+
var phaserTexture = texture instanceof Texture ? texture : this.camera.scene.sys.textures.getFrame(texture);
3503535037

3503635038
if (phaserTexture)
3503735039
{
@@ -49993,20 +49995,21 @@ var Size = {
4999349995
},
4999449996

4999549997
/**
49996-
* Sets the size of this Game Object to be that of the given Frame.
49998+
* Sets the size of this Game Object to be that of the given Frame or the current Frame.
4999749999
*
4999850000
* This will not change the size that the Game Object is rendered in-game.
4999950001
* For that you need to either set the scale of the Game Object (`setScale`) or call the
5000050002
* `setDisplaySize` method, which is the same thing as changing the scale but allows you
5000150003
* to do so by giving pixel values.
5000250004
*
50003-
* If you have enabled this Game Object for input, changing the size will _not_ change the
50004-
* size of the hit area. To do this you should adjust the `input.hitArea` object directly.
50005+
* If you have enabled this Game Object for input with a custom hit area, changing the size of the Game Object will _not_ change the
50006+
* size of the hit area. If you wish to do this, you should adjust the `input.hitArea` object directly.
50007+
* If you have enabled this Game Object for input without a custom hit area, the hit area will be automatically resized to match the size of the selected Frame.
5000550008
*
5000650009
* @method Phaser.GameObjects.Components.Size#setSizeToFrame
5000750010
* @since 3.0.0
5000850011
*
50009-
* @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.
50012+
* @param {Phaser.Textures.Frame} [frame] - The frame to base the size of this Game Object on. The default is the current frame of the Game Object.
5001050013
*
5001150014
* @return {this} This Game Object instance.
5001250015
*/
@@ -92425,7 +92428,7 @@ var Stencil = new Class({
9242592428
// Invert the stencil area if needed.
9242692429
if (gameObject.stencilInvert)
9242792430
{
92428-
renderer.renderNodes.getNode('FillCamera').run(currentContext, 0x000000, drawingContext.useCanvas);
92431+
renderer.renderNodes.getNode('FillCamera').run(currentContext, 0xff000000, drawingContext.useCanvas);
9242992432

9243092433
currentContext = currentContext.getClone();
9243192434
currentContext.use();
@@ -173450,7 +173453,7 @@ var WebGLStencilParametersFactory = {
173450173453
* @param {GLenum} [opZfail=GL_KEEP] - The operation to perform if the stencil test passes but the depth test fails.
173451173454
* @param {GLenum} [opZpass=GL_KEEP] - The operation to perform if the stencil test passes and the depth test passes or is disabled.
173452173455
* @param {GLint} [clear=0] - The value to clear the stencil buffer to.
173453-
* @param {GLuint} [writeMask=0x00] - The mask applied to the stencil buffer value when it is written. Set to 0 to prevent writing. Set to 0xFF to allow full writing.
173456+
* @param {GLuint} [writeMask=0xFF] - The mask applied to the stencil buffer value when it is written. Set to 0 to prevent writing. Set to 0xFF to allow full writing.
173454173457
*
173455173458
* @return {Phaser.Types.Renderer.WebGL.WebGLStencilParameters} The created WebGLStencilParameters.
173456173459
*/
@@ -173465,7 +173468,7 @@ var WebGLStencilParametersFactory = {
173465173468
if (opZfail === undefined) { opZfail = gl.KEEP; }
173466173469
if (opZpass === undefined) { opZpass = gl.KEEP; }
173467173470
if (clear === undefined) { clear = 0; }
173468-
if (writeMask === undefined) { writeMask = 0x00; }
173471+
if (writeMask === undefined) { writeMask = 0xFF; }
173469173472
var parameters = {
173470173473
enabled: enabled,
173471173474
func: {
@@ -177840,7 +177843,7 @@ var FillCamera = new Class({
177840177843
* @method Phaser.Renderer.WebGL.RenderNodes.FillCamera#run
177841177844
* @since 4.0.0
177842177845
* @param {Phaser.Renderer.WebGL.DrawingContext} drawingContext - The context currently in use.
177843-
* @param {number} color - The color to fill the camera with.
177846+
* @param {number} color - The color to fill the camera with. Note, this must be a 32-bit ARGB integer.
177844177847
* @param {boolean} [isFramebufferCamera] - Is this camera rendering to a framebuffer? If so, the camera position will not be applied, on the assumption that the camera position will be used to position the framebuffer in the external context.
177845177848
*/
177846177849
run: function (drawingContext, color, isFramebufferCamera)
@@ -196616,9 +196619,16 @@ var ScaleManager = new Class({
196616196619
{
196617196620
_this.updateBounds();
196618196621

196622+
// --- FIX START ---
196623+
// Recalculate parent container size and force Phaser to resize.
196624+
_this.getParentBounds();
196625+
_this.refresh();
196626+
// --- FIX END ---
196627+
196619196628
_this.dirty = true;
196620196629
};
196621196630

196631+
196622196632
// Only dispatched on mobile devices
196623196633
if (screen.orientation && screen.orientation.addEventListener)
196624196634
{
@@ -215576,6 +215586,7 @@ module.exports = Frame;
215576215586
*/
215577215587

215578215588
var Class = __webpack_require__(83419);
215589+
var FilterMode = __webpack_require__(19673);
215579215590
var Frame = __webpack_require__(4327);
215580215591
var TextureSource = __webpack_require__(11876);
215581215592

@@ -216204,7 +216215,7 @@ var Texture = new Class({
216204216215

216205216216
if (value)
216206216217
{
216207-
this.setFilter(Phaser.Textures.FilterMode.LINEAR);
216218+
this.setFilter(FilterMode.LINEAR);
216208216219
}
216209216220
},
216210216221

@@ -241856,13 +241867,13 @@ var BaseTween = new Class({
241856241867
*/
241857241868
updateStartCountdown: function (delta)
241858241869
{
241859-
this.countdown -= delta;
241870+
this.startDelay -= delta;
241860241871

241861-
if (this.countdown <= 0)
241872+
if (this.startDelay <= 0)
241862241873
{
241863-
this.hasStarted = true;
241864-
241865241874
this.setActiveState();
241875+
241876+
this.hasStarted = true;
241866241877

241867241878
this.dispatchEvent(Events.TWEEN_START, 'onStart');
241868241879

@@ -243682,17 +243693,7 @@ var Tween = new Class({
243682243693
}
243683243694
else if (!this.hasStarted)
243684243695
{
243685-
this.startDelay -= delta;
243686-
243687-
if (this.startDelay <= 0)
243688-
{
243689-
this.hasStarted = true;
243690-
243691-
this.dispatchEvent(Events.TWEEN_START, 'onStart');
243692-
243693-
// Reset the delta so we always start progress from zero
243694-
delta = 0;
243695-
}
243696+
delta = this.updateStartCountdown(delta);
243696243697
}
243697243698

243698243699
var stillRunning = false;
@@ -244297,17 +244298,7 @@ var TweenChain = new Class({
244297244298
}
244298244299
else if (!this.hasStarted)
244299244300
{
244300-
this.startDelay -= delta;
244301-
244302-
if (this.startDelay <= 0)
244303-
{
244304-
this.hasStarted = true;
244305-
244306-
this.dispatchEvent(Events.TWEEN_START, 'onStart');
244307-
244308-
// Reset the delta so we always start progress from zero
244309-
delta = 0;
244310-
}
244301+
delta = this.updateStartCountdown(delta);
244311244302
}
244312244303

244313244304
var remove = false;

dist/phaser-arcade-physics.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)