v3.24.1 release

This commit is contained in:
Richard Davey 2020-07-14 09:47:03 +01:00
parent 268a97b084
commit 374d3fcad1
6 changed files with 81 additions and 174 deletions

View file

@ -4186,10 +4186,13 @@ var File = new Class({
/**
* The URL of the file, not including baseURL.
* Automatically has Loader.path prepended to it.
*
* Automatically has Loader.path prepended to it if a string.
*
* Can also be a JavaScript Object, such as the results of parsing JSON data.
*
* @name Phaser.Loader.File#url
* @type {(function|object|string)}
* @type {object|string}
* @since 3.0.0
*/
this.url = GetFastValue(fileConfig, 'url');
@ -7731,7 +7734,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.24.0',
VERSION: '3.24.1',
BlendModes: __webpack_require__(52),
@ -9561,7 +9564,7 @@ var IsPlainObject = __webpack_require__(7);
*
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.
* @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.
*/
@ -9730,7 +9733,7 @@ var JSONFile = new Class({
* @since 3.0.0
*
* @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
* @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
*
@ -26077,7 +26080,7 @@ var BitmapText = new Class({
* Updates the Display Origin cached values internally stored on this Game Object.
* You don't usually call this directly, but it is exposed for edge-cases where you may.
*
* @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin
* @method Phaser.GameObjects.BitmapText#updateDisplayOrigin
* @since 3.0.0
*
* @return {this} This Game Object instance.
@ -134258,15 +134261,15 @@ module.exports = RandomXYZW;
* @function Phaser.Math.RotateTo
* @since 3.24.0
*
* @generic {Phaser.Math.Vector2Like} T - [point,$return]
* @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]
*
* @param {Phaser.Math.Vector2Like} point - The point to be positioned.
* @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.
* @param {number} x - The horizontal coordinate to position from.
* @param {number} y - The vertical coordinate to position from.
* @param {number} angle - The angle of rotation in radians.
* @param {number} distance - The distance from (x, y) to place the point at.
*
* @return {Phaser.Math.Vector2Like} The given point.
* @return {Phaser.Types.Math.Vector2Like} The given point.
*/
var RotateTo = function (point, x, y, angle, distance)
{
@ -166218,7 +166221,7 @@ var MultiFile = __webpack_require__(61);
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
* @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
*/
@ -166394,7 +166397,7 @@ var AtlasJSONFile = new Class({
*
* @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
* @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
*
@ -170719,7 +170722,7 @@ var TILEMAP_FORMATS = __webpack_require__(32);
*
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.
*/
var TilemapJSONFile = new Class({
@ -170818,7 +170821,7 @@ var TilemapJSONFile = new Class({
* @since 3.0.0
*
* @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
*
* @return {this} The Loader instance.
@ -178943,10 +178946,10 @@ module.exports = {
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
*
*
* The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.
* This method should not be called directly. It is a utility function of the Render module.
*
*
* A Static Tilemap Layer renders immediately and does not use any batching.
*
* @method Phaser.Tilemaps.StaticTilemapLayer#renderWebGL
@ -178957,9 +178960,8 @@ module.exports = {
* @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
*/
var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
{
var tilesets = src.tileset;
@ -178968,42 +178970,9 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc
renderer.setPipeline(pipeline);
var camMatrix = renderer._tempMatrix1;
var layerMatrix = renderer._tempMatrix2;
var calcMatrix = renderer._tempMatrix3;
layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);
camMatrix.copyFrom(camera.matrix);
if (parentMatrix)
{
// Multiply the camera by the parent matrix
camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);
// Undo the camera scroll
layerMatrix.e = src.x;
layerMatrix.f = src.y;
// Multiply by the layer matrix, store result in calcMatrix
camMatrix.multiply(layerMatrix, calcMatrix);
}
else
{
layerMatrix.e -= camera.scrollX * src.scrollFactorX;
layerMatrix.f -= camera.scrollY * src.scrollFactorY;
// Multiply by the layer matrix, store result in calcMatrix
camMatrix.multiply(layerMatrix, calcMatrix);
}
var modelMatrix = pipeline.modelIdentity().modelMatrix;
modelMatrix[0] = calcMatrix.a;
modelMatrix[1] = calcMatrix.b;
modelMatrix[4] = calcMatrix.c;
modelMatrix[5] = calcMatrix.d;
modelMatrix[12] = calcMatrix.e;
modelMatrix[13] = calcMatrix.f;
pipeline.modelIdentity();
pipeline.modelTranslate(src.x - (camera.scrollX * src.scrollFactorX), src.y - (camera.scrollY * src.scrollFactorY), 0);
pipeline.modelScale(src.scaleX, src.scaleY, 1);
pipeline.viewLoad2D(camera.matrix.matrix);
@ -179017,13 +178986,13 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc
{
renderer.flush();
}
pipeline.vertexBuffer = src.vertexBuffer[i];
renderer.setPipeline(pipeline);
renderer.setTexture2D(tilesets[i].glTexture, 0);
renderer.gl.drawArrays(pipeline.topology, 0, src.vertexCount[i]);
}
}

File diff suppressed because one or more lines are too long

View file

@ -4769,10 +4769,13 @@ var File = new Class({
/**
* The URL of the file, not including baseURL.
* Automatically has Loader.path prepended to it.
*
* Automatically has Loader.path prepended to it if a string.
*
* Can also be a JavaScript Object, such as the results of parsing JSON data.
*
* @name Phaser.Loader.File#url
* @type {(function|object|string)}
* @type {object|string}
* @since 3.0.0
*/
this.url = GetFastValue(fileConfig, 'url');
@ -10488,7 +10491,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.24.0',
VERSION: '3.24.1',
BlendModes: __webpack_require__(48),
@ -12675,7 +12678,7 @@ var IsPlainObject = __webpack_require__(7);
*
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.
* @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.
*/
@ -12844,7 +12847,7 @@ var JSONFile = new Class({
* @since 3.0.0
*
* @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
* @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
*
@ -31646,7 +31649,7 @@ var BitmapText = new Class({
* Updates the Display Origin cached values internally stored on this Game Object.
* You don't usually call this directly, but it is exposed for edge-cases where you may.
*
* @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin
* @method Phaser.GameObjects.BitmapText#updateDisplayOrigin
* @since 3.0.0
*
* @return {this} This Game Object instance.
@ -149687,15 +149690,15 @@ module.exports = RandomXYZW;
* @function Phaser.Math.RotateTo
* @since 3.24.0
*
* @generic {Phaser.Math.Vector2Like} T - [point,$return]
* @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]
*
* @param {Phaser.Math.Vector2Like} point - The point to be positioned.
* @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.
* @param {number} x - The horizontal coordinate to position from.
* @param {number} y - The vertical coordinate to position from.
* @param {number} angle - The angle of rotation in radians.
* @param {number} distance - The distance from (x, y) to place the point at.
*
* @return {Phaser.Math.Vector2Like} The given point.
* @return {Phaser.Types.Math.Vector2Like} The given point.
*/
var RotateTo = function (point, x, y, angle, distance)
{
@ -182125,7 +182128,7 @@ var MultiFile = __webpack_require__(66);
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
* @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
*/
@ -182301,7 +182304,7 @@ var AtlasJSONFile = new Class({
*
* @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
* @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
*
@ -186626,7 +186629,7 @@ var TILEMAP_FORMATS = __webpack_require__(35);
*
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.
*/
var TilemapJSONFile = new Class({
@ -186725,7 +186728,7 @@ var TilemapJSONFile = new Class({
* @since 3.0.0
*
* @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
*
* @return {this} The Loader instance.
@ -199632,10 +199635,10 @@ module.exports = {
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
*
*
* The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.
* This method should not be called directly. It is a utility function of the Render module.
*
*
* A Static Tilemap Layer renders immediately and does not use any batching.
*
* @method Phaser.Tilemaps.StaticTilemapLayer#renderWebGL
@ -199646,9 +199649,8 @@ module.exports = {
* @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
*/
var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
{
var tilesets = src.tileset;
@ -199657,42 +199659,9 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc
renderer.setPipeline(pipeline);
var camMatrix = renderer._tempMatrix1;
var layerMatrix = renderer._tempMatrix2;
var calcMatrix = renderer._tempMatrix3;
layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);
camMatrix.copyFrom(camera.matrix);
if (parentMatrix)
{
// Multiply the camera by the parent matrix
camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);
// Undo the camera scroll
layerMatrix.e = src.x;
layerMatrix.f = src.y;
// Multiply by the layer matrix, store result in calcMatrix
camMatrix.multiply(layerMatrix, calcMatrix);
}
else
{
layerMatrix.e -= camera.scrollX * src.scrollFactorX;
layerMatrix.f -= camera.scrollY * src.scrollFactorY;
// Multiply by the layer matrix, store result in calcMatrix
camMatrix.multiply(layerMatrix, calcMatrix);
}
var modelMatrix = pipeline.modelIdentity().modelMatrix;
modelMatrix[0] = calcMatrix.a;
modelMatrix[1] = calcMatrix.b;
modelMatrix[4] = calcMatrix.c;
modelMatrix[5] = calcMatrix.d;
modelMatrix[12] = calcMatrix.e;
modelMatrix[13] = calcMatrix.f;
pipeline.modelIdentity();
pipeline.modelTranslate(src.x - (camera.scrollX * src.scrollFactorX), src.y - (camera.scrollY * src.scrollFactorY), 0);
pipeline.modelScale(src.scaleX, src.scaleY, 1);
pipeline.viewLoad2D(camera.matrix.matrix);
@ -199706,13 +199675,13 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc
{
renderer.flush();
}
pipeline.vertexBuffer = src.vertexBuffer[i];
renderer.setPipeline(pipeline);
renderer.setTexture2D(tilesets[i].glTexture, 0);
renderer.gl.drawArrays(pipeline.topology, 0, src.vertexCount[i]);
}
}

File diff suppressed because one or more lines are too long

83
dist/phaser.js vendored
View file

@ -4186,10 +4186,13 @@ var File = new Class({
/**
* The URL of the file, not including baseURL.
* Automatically has Loader.path prepended to it.
*
* Automatically has Loader.path prepended to it if a string.
*
* Can also be a JavaScript Object, such as the results of parsing JSON data.
*
* @name Phaser.Loader.File#url
* @type {(function|object|string)}
* @type {object|string}
* @since 3.0.0
*/
this.url = GetFastValue(fileConfig, 'url');
@ -7731,7 +7734,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.24.0',
VERSION: '3.24.1',
BlendModes: __webpack_require__(52),
@ -10104,7 +10107,7 @@ var IsPlainObject = __webpack_require__(7);
*
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.
* @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.
*/
@ -10273,7 +10276,7 @@ var JSONFile = new Class({
* @since 3.0.0
*
* @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
* @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
*
@ -29186,7 +29189,7 @@ var BitmapText = new Class({
* Updates the Display Origin cached values internally stored on this Game Object.
* You don't usually call this directly, but it is exposed for edge-cases where you may.
*
* @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin
* @method Phaser.GameObjects.BitmapText#updateDisplayOrigin
* @since 3.0.0
*
* @return {this} This Game Object instance.
@ -139411,15 +139414,15 @@ module.exports = RandomXYZW;
* @function Phaser.Math.RotateTo
* @since 3.24.0
*
* @generic {Phaser.Math.Vector2Like} T - [point,$return]
* @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]
*
* @param {Phaser.Math.Vector2Like} point - The point to be positioned.
* @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.
* @param {number} x - The horizontal coordinate to position from.
* @param {number} y - The vertical coordinate to position from.
* @param {number} angle - The angle of rotation in radians.
* @param {number} distance - The distance from (x, y) to place the point at.
*
* @return {Phaser.Math.Vector2Like} The given point.
* @return {Phaser.Types.Math.Vector2Like} The given point.
*/
var RotateTo = function (point, x, y, angle, distance)
{
@ -171371,7 +171374,7 @@ var MultiFile = __webpack_require__(61);
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
* @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
*/
@ -171547,7 +171550,7 @@ var AtlasJSONFile = new Class({
*
* @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
* @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
* @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
*
@ -175872,7 +175875,7 @@ var TILEMAP_FORMATS = __webpack_require__(32);
*
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
* @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig)} key - The key to use for this file, or a file configuration object.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.
*/
var TilemapJSONFile = new Class({
@ -175971,7 +175974,7 @@ var TilemapJSONFile = new Class({
* @since 3.0.0
*
* @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.
* @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
* @param {object|string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
* @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
*
* @return {this} The Loader instance.
@ -186671,10 +186674,10 @@ module.exports = {
/**
* Renders this Game Object with the WebGL Renderer to the given Camera.
*
*
* The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.
* This method should not be called directly. It is a utility function of the Render module.
*
*
* A Static Tilemap Layer renders immediately and does not use any batching.
*
* @method Phaser.Tilemaps.StaticTilemapLayer#renderWebGL
@ -186685,9 +186688,8 @@ module.exports = {
* @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
*/
var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
{
var tilesets = src.tileset;
@ -186696,42 +186698,9 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc
renderer.setPipeline(pipeline);
var camMatrix = renderer._tempMatrix1;
var layerMatrix = renderer._tempMatrix2;
var calcMatrix = renderer._tempMatrix3;
layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);
camMatrix.copyFrom(camera.matrix);
if (parentMatrix)
{
// Multiply the camera by the parent matrix
camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);
// Undo the camera scroll
layerMatrix.e = src.x;
layerMatrix.f = src.y;
// Multiply by the layer matrix, store result in calcMatrix
camMatrix.multiply(layerMatrix, calcMatrix);
}
else
{
layerMatrix.e -= camera.scrollX * src.scrollFactorX;
layerMatrix.f -= camera.scrollY * src.scrollFactorY;
// Multiply by the layer matrix, store result in calcMatrix
camMatrix.multiply(layerMatrix, calcMatrix);
}
var modelMatrix = pipeline.modelIdentity().modelMatrix;
modelMatrix[0] = calcMatrix.a;
modelMatrix[1] = calcMatrix.b;
modelMatrix[4] = calcMatrix.c;
modelMatrix[5] = calcMatrix.d;
modelMatrix[12] = calcMatrix.e;
modelMatrix[13] = calcMatrix.f;
pipeline.modelIdentity();
pipeline.modelTranslate(src.x - (camera.scrollX * src.scrollFactorX), src.y - (camera.scrollY * src.scrollFactorY), 0);
pipeline.modelScale(src.scaleX, src.scaleY, 1);
pipeline.viewLoad2D(camera.matrix.matrix);
@ -186745,13 +186714,13 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc
{
renderer.flush();
}
pipeline.vertexBuffer = src.vertexBuffer[i];
renderer.setPipeline(pipeline);
renderer.setTexture2D(tilesets[i].glTexture, 0);
renderer.gl.drawArrays(pipeline.topology, 0, src.vertexCount[i]);
}
}

2
dist/phaser.min.js vendored

File diff suppressed because one or more lines are too long