Skip to content

Commit

Permalink
Merge pull request #707 from photonstorm/release/v2.19.1
Browse files Browse the repository at this point in the history
Release Phaser CE v2.19.1
  • Loading branch information
photonstorm committed Oct 21, 2021
2 parents 3dbfafa + 8377ed1 commit 585b93c
Show file tree
Hide file tree
Showing 224 changed files with 8,044 additions and 7,996 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Change Log

## Unreleased
## Version 2.19.1 - 13 October 2021

### Bug Fixes

- [TilemapLayer#getRayCastTiles()](https://photonstorm.github.io/phaser-ce/Phaser.TilemapLayer.html#getRayCastTiles) was less efficient and behaved incorrectly for horizontal or vertical rays.
- [Text](https://photonstorm.github.io/phaser-ce/Phaser.Text.html#Text) no longer errors when missing a `style` parameter.
- Fixed some WebGL warnings.

### Thanks

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Phaser CE is a fast, free, and fun open source HTML5 game framework. It uses a c

Phaser CE is based on Phaser v2.6.2 by [Photon Storm](http://www.photonstorm.com). [Phaser v3](http://phaser.io/phaser3) and [Phaser v4](https://github.com/phaserjs/phaser4) are in active development.

The [current Phaser CE release is 2.19.0](https://github.com/photonstorm/phaser-ce/releases/tag/v2.19.0).
The [current Phaser CE release is 2.19.1](https://github.com/photonstorm/phaser-ce/releases/tag/v2.19.0).

- **Visit:** The [Phaser website](http://phaser.io) and follow on [Twitter](https://twitter.com/photonstorm) (#[phaserjs](https://twitter.com/hashtag/phaserjs))
- **Learn:** [API Docs](https://photonstorm.github.io/phaser-ce/), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
Expand Down Expand Up @@ -82,19 +82,19 @@ Please see additional steps for [Browserify/CommonJS](#browserify) and [Webpack]
[Phaser CE is on jsDelivr](http://www.jsdelivr.com/projects/phaser-ce). Include the following in your html:

```html
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.19.0/build/phaser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.19.1/build/phaser.js"></script>
```

or the minified version:

```html
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.19.0"></script>
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.19.1"></script>
```

[Custom builds](https://cdn.jsdelivr.net/npm/phaser-ce@2.19.0/build/custom/) are available too, e.g.,
[Custom builds](https://cdn.jsdelivr.net/npm/phaser-ce@2.19.1/build/custom/) are available too, e.g.,

```html
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.19.0/build/custom/phaser-arcade-physics.js"></script>
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.19.1/build/custom/phaser-arcade-physics.js"></script>
```

<a name="getting-started"></a>
Expand Down
2 changes: 1 addition & 1 deletion build/custom/creature.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/custom/creature.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/custom/p2.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/custom/p2.min.js

Large diffs are not rendered by default.

80 changes: 43 additions & 37 deletions build/custom/phaser-arcade-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser CE - https://github.com/photonstorm/phaser-ce
*
* v2.19.0 "2021-08-23" - Built: Mon Aug 23 2021 13:20:15
* v2.19.1 "2021-10-13" - Built: Tue Oct 19 2021 11:50:07
*
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
*
Expand Down Expand Up @@ -5311,7 +5311,10 @@ PIXI.WebGLSpriteBatch.prototype.flush = function ()
gl.vertexAttribPointer(shader.colorAttribute, 4, gl.UNSIGNED_BYTE, true, stride, 16);

// Texture index
gl.vertexAttribPointer(shader.aTextureIndex, 1, gl.FLOAT, false, stride, 20);
if (PIXI._enableMultiTextureToggle)
{
gl.vertexAttribPointer(shader.aTextureIndex, 1, gl.FLOAT, false, stride, 20);
}
}

// upload the verts to the buffer
Expand Down Expand Up @@ -7784,7 +7787,7 @@ var Phaser = Phaser || { // jshint ignore:line
* @constant Phaser.VERSION
* @type {string}
*/
VERSION: '2.19.0',
VERSION: '2.19.1',

/**
* An array of Phaser game instances.
Expand Down Expand Up @@ -22035,6 +22038,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
/**
* @property {boolean} forceSingleUpdate - Use a variable-step game loop (true) or a fixed-step game loop (false).
* @default
* @see Phaser.Time#desiredFps
*/
this.forceSingleUpdate = true;

Expand All @@ -22045,7 +22049,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
this.forceSingleRender = false;

/**
* @property {boolean} dropFrames - Skip a logic update and render if the delta is too large (see {@link Phaser.Time#deltaMax}).
* @property {boolean} dropFrames - Skip a logic update and render if the delta is too large (see {@link Phaser.Time#deltaMax}). When false, the delta is clamped to the maximum instead.
* @default
*/
this.dropFrames = false;
Expand Down Expand Up @@ -43791,7 +43795,7 @@ Phaser.Text = function (game, x, y, text, style)
* @property {string} _testString
* @private
*/
this._testString = style.testString || '|MÂÉQfjq_';
this._testString = '|MÂÉQfjq_';

/**
* @property {number} _res - Internal canvas resolution var.
Expand Down Expand Up @@ -55363,7 +55367,7 @@ Phaser.Time = function (game)
this.deltaTotal = 0;

/**
* The maximum acceptable step interval in milliseconds, based on `desiredMinFps`.
* The maximum acceptable step interval in milliseconds, based on `desiredMinFps`. You can also set this directly.
* @property {number} deltaMax
*/
this.deltaMax = 200;
Expand All @@ -55377,12 +55381,10 @@ Phaser.Time = function (game)

/**
* The desired frame rate of the game.
*
* This is used is used to calculate the physic/logic multiplier and how to apply catch-up logic updates.
*
* @property {number} _desiredFps
* @private
* @default
* @see Phaser.Time#desiredFps
*/
this._desiredFps = 60;

Expand Down Expand Up @@ -55872,7 +55874,7 @@ Phaser.Time.prototype = {
/**
* The number of logic updates per second.
*
* This is used is used to calculate the physic / logic multiplier and how to apply catch-up logic updates.
* This is used is used to calculate {@link Phaser.Time#delta} when {@link Phaser.Game#forceSingleUpdate} is off.
*
* The render rate is unaffected unless you also turn off {@link Phaser.Game#forceSingleRender}.
*
Expand Down Expand Up @@ -70340,6 +70342,7 @@ Phaser.Utils.Debug.prototype = {
{
this.bmd = new Phaser.BitmapData(this.game, '__DEBUG', this.game.width, this.game.height, true);
this.sprite = this.game.make.image(0, 0, this.bmd);
this.sprite.anchor.set(0, 0);
this.game.stage.addChild(this.sprite);

this.game.scale.onSizeChange.add(this.resize, this);
Expand Down Expand Up @@ -82289,7 +82292,7 @@ Phaser.TilemapLayer = function (game, tilemap, index, width, height)
*
* @property {?DOMCanvasElement} [copyCanvas=(auto)] - [Internal] If set, force using a separate (shared) copy canvas.
* Using a canvas bitblt/copy when the source and destinations region overlap produces unexpected behavior
* in some browsers, notably Safari.
* in some browsers, notably Safari.
*
* @default
*/
Expand Down Expand Up @@ -82397,7 +82400,7 @@ Phaser.TilemapLayer = function (game, tilemap, index, width, height)
/*
* Collision width/height (pixels)
* What purpose do these have? Most things use tile width/height directly.
* This also only extends collisions right and down.
* This also only extends collisions right and down.
*/
cw: tilemap.tileWidth,
ch: tilemap.tileHeight,
Expand Down Expand Up @@ -82539,7 +82542,7 @@ Phaser.TilemapLayer.prototype._renderWebGL = function (renderSession)
this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x;
this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y;
}

this._scrollX = (this.game.camera.view.x - this.tileOffset.x) * this.scrollFactorX / this.scale.x;
this._scrollY = (this.game.camera.view.y - this.tileOffset.y) * this.scrollFactorY / this.scale.y;

Expand Down Expand Up @@ -82646,7 +82649,7 @@ Phaser.TilemapLayer.prototype._fixX = function (x)
{
return x;
}

// This executes if the scrollFactorX is 0 and the x position of the tilemap is off from standard.
if (this.scrollFactorX === 0 && this.position.x !== 0)
{
Expand Down Expand Up @@ -82688,13 +82691,13 @@ Phaser.TilemapLayer.prototype._fixY = function (y)
{
return y;
}

// This executes if the scrollFactorY is 0 and the y position of the tilemap is off from standard.
if (this.scrollFactorY === 0 && this.position.y !== 0)
{
return y - this.position.y;
}

return this._scrollY + (y - (this._scrollY / this.scrollFactorY));
};

Expand Down Expand Up @@ -82779,29 +82782,32 @@ Phaser.TilemapLayer.prototype.getRayCastTiles = function (line, stepRate, collid
if (collides === undefined) { collides = false; }
if (interestingFace === undefined) { interestingFace = false; }

// First get all tiles that touch the bounds of the line
var tiles = this.getTiles(line.x, line.y, line.width, line.height, collides, interestingFace);
var skipInteresting = !(collides || interestingFace);

if (tiles.length === 0)
{
return [];
}

// Now we only want the tiles that intersect with the points on this line
var coords = line.coordinatesOnLine(stepRate);
var results = [];
var point = new Phaser.Point();
var layer = this.map.layers[this.map.getLayer(this)];
var layerData = layer.data;
var width = layer.width;
var height = layer.height;

for (var i = 0; i < tiles.length; i++)
for (var t = 0; t < coords.length; t++)
{
for (var t = 0; t < coords.length; t++)
var coord = coords[t];

this.getTileXY(coord[0], coord[1], point);

var x = point.x;
var y = point.y;

if (x < 0 || x >= width || y < 0 || y >= height) { continue; }

var tile = layerData[y][x];

if (results.indexOf(tile) === -1 && (skipInteresting || tile.isInteresting(collides, interestingFace)))
{
var tile = tiles[i];
var coord = coords[t];
if (tile.containsPoint(coord[0], coord[1]))
{
results.push(tile);
break;
}
results.push(tile);
}
}

Expand Down Expand Up @@ -82922,9 +82928,9 @@ Phaser.TilemapLayer.prototype.resetTilesetCache = function ()

/**
* This method will set the scale of the tilemap as well as update the underlying block data of this layer.
*
*
* @method Phaser.TilemapLayer#setScale
* @param {number} [xScale=1] - The scale factor along the X-plane
* @param {number} [xScale=1] - The scale factor along the X-plane
* @param {number} [yScale] - The scale factor along the Y-plane
*/
Phaser.TilemapLayer.prototype.setScale = function (xScale, yScale)
Expand Down Expand Up @@ -83059,7 +83065,7 @@ Phaser.TilemapLayer.prototype.renderRegion = function (scrollX, scrollY, left, t
bottom = Math.min(height - 1, bottom);
}
}

// top-left pixel of top-left cell
var baseX = (left * tw) - scrollX;
var baseY = (top * th) - scrollY;
Expand Down Expand Up @@ -83294,7 +83300,7 @@ Phaser.TilemapLayer.prototype.render = function ()
}

this.context.save();

mc.scrollX = scrollX;
mc.scrollY = scrollY;

Expand Down
2 changes: 1 addition & 1 deletion build/custom/phaser-arcade-physics.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/custom/phaser-arcade-physics.min.js

Large diffs are not rendered by default.

0 comments on commit 585b93c

Please sign in to comment.