This commit is contained in:
Richard Davey 2024-09-17 20:23:08 +01:00
parent d6ccb63de7
commit 580ff3074c
No known key found for this signature in database
10 changed files with 302594 additions and 302387 deletions

View file

@ -15645,7 +15645,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.85.1',
VERSION: '3.85.2',
BlendModes: __webpack_require__(10312),
@ -47313,33 +47313,55 @@ var TransformMatrix = new Class({
var e = matrix[4];
var f = matrix[5];
// Compute the unrounded positions for the quad
var x0 = x * a + y * c + e;
var y0 = x * b + y * d + f;
var x1 = x * a + yh * c + e;
var y1 = x * b + yh * d + f;
var x2 = xw * a + yh * c + e;
var y2 = xw * b + yh * d + f;
var x3 = xw * a + y * c + e;
var y3 = xw * b + y * d + f;
if (roundPixels)
{
quad[0] = Math.floor((x * a + y * c + e) + 0.5);
quad[1] = Math.floor((x * b + y * d + f) + 0.5);
// Round the top-left corner
var rx0 = Math.floor(x0 + 0.5);
var ry0 = Math.floor(y0 + 0.5);
quad[2] = Math.floor((x * a + yh * c + e) + 0.5);
quad[3] = Math.floor((x * b + yh * d + f) + 0.5);
// Calculate the offset caused by rounding
var dx = rx0 - x0;
var dy = ry0 - y0;
quad[4] = Math.floor((xw * a + yh * c + e) + 0.5);
quad[5] = Math.floor((xw * b + yh * d + f) + 0.5);
// Adjust the other corners by the same offset
quad[0] = rx0;
quad[1] = ry0;
quad[6] = Math.floor((xw * a + y * c + e) + 0.5);
quad[7] = Math.floor((xw * b + y * d + f) + 0.5);
quad[2] = x1 + dx;
quad[3] = y1 + dy;
quad[4] = x2 + dx;
quad[5] = y2 + dy;
quad[6] = x3 + dx;
quad[7] = y3 + dy;
}
else
{
quad[0] = x * a + y * c + e;
quad[1] = x * b + y * d + f;
quad[0] = x0;
quad[1] = y0;
quad[2] = x * a + yh * c + e;
quad[3] = x * b + yh * d + f;
quad[2] = x1;
quad[3] = y1;
quad[4] = xw * a + yh * c + e;
quad[5] = xw * b + yh * d + f;
quad[4] = x2;
quad[5] = y2;
quad[6] = xw * a + y * c + e;
quad[7] = xw * b + y * d + f;
quad[6] = x3;
quad[7] = y3;
}
return quad;
@ -161612,7 +161634,7 @@ var WebGLRenderer = new Class({
/**
* Array of strings that indicate which WebGL extensions are supported by the browser.
* This is populated in the `boot` method.
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#supportedExtensions
* @type {string[]}
@ -161625,6 +161647,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `ANGLE_instanced_arrays` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#instancedArraysExtension
* @type {ANGLE_instanced_arrays}
* @default null
@ -161636,6 +161660,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `OES_vertex_array_object` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#vaoExtension
* @type {OES_vertex_array_object}
* @default null
@ -161980,26 +162006,7 @@ var WebGLRenderer = new Class({
this.gl = gl;
var _this = this;
// Load supported extensions
var setupExtensions = function ()
{
var exts = gl.getSupportedExtensions();
_this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
_this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
_this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
};
setupExtensions();
this.setExtensions();
this.setContextHandlers();
@ -162149,6 +162156,33 @@ var WebGLRenderer = new Class({
this.resize(width, height);
},
/**
* Queries the GL context to get the supported extensions.
*
* Then sets them into the `supportedExtensions`, `instancedArraysExtension` and `vaoExtension` properties.
*
* Called automatically during the `init` method.
*
* @method Phaser.Renderer.WebGL.WebGLRenderer#setExtensions
* @since 3.85.2
*/
setExtensions: function ()
{
var gl = this.gl;
var exts = gl.getSupportedExtensions();
this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
},
/**
* Sets the handlers that are called when WebGL context is lost or restored by the browser.
*
@ -162289,7 +162323,7 @@ var WebGLRenderer = new Class({
this.resize(this.game.scale.baseSize.width, this.game.scale.baseSize.height);
// Restore GL extensions.
this.init.setupExtensions();
this.setExtensions();
// Context has been restored.

File diff suppressed because one or more lines are too long

112
dist/phaser-ie9.js vendored
View file

@ -15645,7 +15645,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.85.1',
VERSION: '3.85.2',
BlendModes: __webpack_require__(10312),
@ -47313,33 +47313,55 @@ var TransformMatrix = new Class({
var e = matrix[4];
var f = matrix[5];
// Compute the unrounded positions for the quad
var x0 = x * a + y * c + e;
var y0 = x * b + y * d + f;
var x1 = x * a + yh * c + e;
var y1 = x * b + yh * d + f;
var x2 = xw * a + yh * c + e;
var y2 = xw * b + yh * d + f;
var x3 = xw * a + y * c + e;
var y3 = xw * b + y * d + f;
if (roundPixels)
{
quad[0] = Math.floor((x * a + y * c + e) + 0.5);
quad[1] = Math.floor((x * b + y * d + f) + 0.5);
// Round the top-left corner
var rx0 = Math.floor(x0 + 0.5);
var ry0 = Math.floor(y0 + 0.5);
quad[2] = Math.floor((x * a + yh * c + e) + 0.5);
quad[3] = Math.floor((x * b + yh * d + f) + 0.5);
// Calculate the offset caused by rounding
var dx = rx0 - x0;
var dy = ry0 - y0;
quad[4] = Math.floor((xw * a + yh * c + e) + 0.5);
quad[5] = Math.floor((xw * b + yh * d + f) + 0.5);
// Adjust the other corners by the same offset
quad[0] = rx0;
quad[1] = ry0;
quad[6] = Math.floor((xw * a + y * c + e) + 0.5);
quad[7] = Math.floor((xw * b + y * d + f) + 0.5);
quad[2] = x1 + dx;
quad[3] = y1 + dy;
quad[4] = x2 + dx;
quad[5] = y2 + dy;
quad[6] = x3 + dx;
quad[7] = y3 + dy;
}
else
{
quad[0] = x * a + y * c + e;
quad[1] = x * b + y * d + f;
quad[0] = x0;
quad[1] = y0;
quad[2] = x * a + yh * c + e;
quad[3] = x * b + yh * d + f;
quad[2] = x1;
quad[3] = y1;
quad[4] = xw * a + yh * c + e;
quad[5] = xw * b + yh * d + f;
quad[4] = x2;
quad[5] = y2;
quad[6] = xw * a + y * c + e;
quad[7] = xw * b + y * d + f;
quad[6] = x3;
quad[7] = y3;
}
return quad;
@ -180158,7 +180180,7 @@ var WebGLRenderer = new Class({
/**
* Array of strings that indicate which WebGL extensions are supported by the browser.
* This is populated in the `boot` method.
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#supportedExtensions
* @type {string[]}
@ -180171,6 +180193,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `ANGLE_instanced_arrays` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#instancedArraysExtension
* @type {ANGLE_instanced_arrays}
* @default null
@ -180182,6 +180206,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `OES_vertex_array_object` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#vaoExtension
* @type {OES_vertex_array_object}
* @default null
@ -180526,26 +180552,7 @@ var WebGLRenderer = new Class({
this.gl = gl;
var _this = this;
// Load supported extensions
var setupExtensions = function ()
{
var exts = gl.getSupportedExtensions();
_this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
_this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
_this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
};
setupExtensions();
this.setExtensions();
this.setContextHandlers();
@ -180695,6 +180702,33 @@ var WebGLRenderer = new Class({
this.resize(width, height);
},
/**
* Queries the GL context to get the supported extensions.
*
* Then sets them into the `supportedExtensions`, `instancedArraysExtension` and `vaoExtension` properties.
*
* Called automatically during the `init` method.
*
* @method Phaser.Renderer.WebGL.WebGLRenderer#setExtensions
* @since 3.85.2
*/
setExtensions: function ()
{
var gl = this.gl;
var exts = gl.getSupportedExtensions();
this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
},
/**
* Sets the handlers that are called when WebGL context is lost or restored by the browser.
*
@ -180835,7 +180869,7 @@ var WebGLRenderer = new Class({
this.resize(this.game.scale.baseSize.width, this.game.scale.baseSize.height);
// Restore GL extensions.
this.init.setupExtensions();
this.setExtensions();
// Context has been restored.

File diff suppressed because one or more lines are too long

112
dist/phaser.esm.js vendored
View file

@ -15633,7 +15633,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.85.1',
VERSION: '3.85.2',
BlendModes: __webpack_require__(10312),
@ -47301,33 +47301,55 @@ var TransformMatrix = new Class({
var e = matrix[4];
var f = matrix[5];
// Compute the unrounded positions for the quad
var x0 = x * a + y * c + e;
var y0 = x * b + y * d + f;
var x1 = x * a + yh * c + e;
var y1 = x * b + yh * d + f;
var x2 = xw * a + yh * c + e;
var y2 = xw * b + yh * d + f;
var x3 = xw * a + y * c + e;
var y3 = xw * b + y * d + f;
if (roundPixels)
{
quad[0] = Math.floor((x * a + y * c + e) + 0.5);
quad[1] = Math.floor((x * b + y * d + f) + 0.5);
// Round the top-left corner
var rx0 = Math.floor(x0 + 0.5);
var ry0 = Math.floor(y0 + 0.5);
quad[2] = Math.floor((x * a + yh * c + e) + 0.5);
quad[3] = Math.floor((x * b + yh * d + f) + 0.5);
// Calculate the offset caused by rounding
var dx = rx0 - x0;
var dy = ry0 - y0;
quad[4] = Math.floor((xw * a + yh * c + e) + 0.5);
quad[5] = Math.floor((xw * b + yh * d + f) + 0.5);
// Adjust the other corners by the same offset
quad[0] = rx0;
quad[1] = ry0;
quad[6] = Math.floor((xw * a + y * c + e) + 0.5);
quad[7] = Math.floor((xw * b + y * d + f) + 0.5);
quad[2] = x1 + dx;
quad[3] = y1 + dy;
quad[4] = x2 + dx;
quad[5] = y2 + dy;
quad[6] = x3 + dx;
quad[7] = y3 + dy;
}
else
{
quad[0] = x * a + y * c + e;
quad[1] = x * b + y * d + f;
quad[0] = x0;
quad[1] = y0;
quad[2] = x * a + yh * c + e;
quad[3] = x * b + yh * d + f;
quad[2] = x1;
quad[3] = y1;
quad[4] = xw * a + yh * c + e;
quad[5] = xw * b + yh * d + f;
quad[4] = x2;
quad[5] = y2;
quad[6] = xw * a + y * c + e;
quad[7] = xw * b + y * d + f;
quad[6] = x3;
quad[7] = y3;
}
return quad;
@ -179608,7 +179630,7 @@ var WebGLRenderer = new Class({
/**
* Array of strings that indicate which WebGL extensions are supported by the browser.
* This is populated in the `boot` method.
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#supportedExtensions
* @type {string[]}
@ -179621,6 +179643,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `ANGLE_instanced_arrays` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#instancedArraysExtension
* @type {ANGLE_instanced_arrays}
* @default null
@ -179632,6 +179656,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `OES_vertex_array_object` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#vaoExtension
* @type {OES_vertex_array_object}
* @default null
@ -179976,26 +180002,7 @@ var WebGLRenderer = new Class({
this.gl = gl;
var _this = this;
// Load supported extensions
var setupExtensions = function ()
{
var exts = gl.getSupportedExtensions();
_this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
_this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
_this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
};
setupExtensions();
this.setExtensions();
this.setContextHandlers();
@ -180145,6 +180152,33 @@ var WebGLRenderer = new Class({
this.resize(width, height);
},
/**
* Queries the GL context to get the supported extensions.
*
* Then sets them into the `supportedExtensions`, `instancedArraysExtension` and `vaoExtension` properties.
*
* Called automatically during the `init` method.
*
* @method Phaser.Renderer.WebGL.WebGLRenderer#setExtensions
* @since 3.85.2
*/
setExtensions: function ()
{
var gl = this.gl;
var exts = gl.getSupportedExtensions();
this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
},
/**
* Sets the handlers that are called when WebGL context is lost or restored by the browser.
*
@ -180285,7 +180319,7 @@ var WebGLRenderer = new Class({
this.resize(this.game.scale.baseSize.width, this.game.scale.baseSize.height);
// Restore GL extensions.
this.init.setupExtensions();
this.setExtensions();
// Context has been restored.

File diff suppressed because one or more lines are too long

112
dist/phaser.js vendored
View file

@ -15645,7 +15645,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.85.1',
VERSION: '3.85.2',
BlendModes: __webpack_require__(10312),
@ -47313,33 +47313,55 @@ var TransformMatrix = new Class({
var e = matrix[4];
var f = matrix[5];
// Compute the unrounded positions for the quad
var x0 = x * a + y * c + e;
var y0 = x * b + y * d + f;
var x1 = x * a + yh * c + e;
var y1 = x * b + yh * d + f;
var x2 = xw * a + yh * c + e;
var y2 = xw * b + yh * d + f;
var x3 = xw * a + y * c + e;
var y3 = xw * b + y * d + f;
if (roundPixels)
{
quad[0] = Math.floor((x * a + y * c + e) + 0.5);
quad[1] = Math.floor((x * b + y * d + f) + 0.5);
// Round the top-left corner
var rx0 = Math.floor(x0 + 0.5);
var ry0 = Math.floor(y0 + 0.5);
quad[2] = Math.floor((x * a + yh * c + e) + 0.5);
quad[3] = Math.floor((x * b + yh * d + f) + 0.5);
// Calculate the offset caused by rounding
var dx = rx0 - x0;
var dy = ry0 - y0;
quad[4] = Math.floor((xw * a + yh * c + e) + 0.5);
quad[5] = Math.floor((xw * b + yh * d + f) + 0.5);
// Adjust the other corners by the same offset
quad[0] = rx0;
quad[1] = ry0;
quad[6] = Math.floor((xw * a + y * c + e) + 0.5);
quad[7] = Math.floor((xw * b + y * d + f) + 0.5);
quad[2] = x1 + dx;
quad[3] = y1 + dy;
quad[4] = x2 + dx;
quad[5] = y2 + dy;
quad[6] = x3 + dx;
quad[7] = y3 + dy;
}
else
{
quad[0] = x * a + y * c + e;
quad[1] = x * b + y * d + f;
quad[0] = x0;
quad[1] = y0;
quad[2] = x * a + yh * c + e;
quad[3] = x * b + yh * d + f;
quad[2] = x1;
quad[3] = y1;
quad[4] = xw * a + yh * c + e;
quad[5] = xw * b + yh * d + f;
quad[4] = x2;
quad[5] = y2;
quad[6] = xw * a + y * c + e;
quad[7] = xw * b + y * d + f;
quad[6] = x3;
quad[7] = y3;
}
return quad;
@ -179716,7 +179738,7 @@ var WebGLRenderer = new Class({
/**
* Array of strings that indicate which WebGL extensions are supported by the browser.
* This is populated in the `boot` method.
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#supportedExtensions
* @type {string[]}
@ -179729,6 +179751,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `ANGLE_instanced_arrays` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#instancedArraysExtension
* @type {ANGLE_instanced_arrays}
* @default null
@ -179740,6 +179764,8 @@ var WebGLRenderer = new Class({
* If the browser supports the `OES_vertex_array_object` extension, this property will hold
* a reference to the glExtension for it.
*
* This is populated in the `setExtensions` method.
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#vaoExtension
* @type {OES_vertex_array_object}
* @default null
@ -180084,26 +180110,7 @@ var WebGLRenderer = new Class({
this.gl = gl;
var _this = this;
// Load supported extensions
var setupExtensions = function ()
{
var exts = gl.getSupportedExtensions();
_this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
_this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
_this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
};
setupExtensions();
this.setExtensions();
this.setContextHandlers();
@ -180253,6 +180260,33 @@ var WebGLRenderer = new Class({
this.resize(width, height);
},
/**
* Queries the GL context to get the supported extensions.
*
* Then sets them into the `supportedExtensions`, `instancedArraysExtension` and `vaoExtension` properties.
*
* Called automatically during the `init` method.
*
* @method Phaser.Renderer.WebGL.WebGLRenderer#setExtensions
* @since 3.85.2
*/
setExtensions: function ()
{
var gl = this.gl;
var exts = gl.getSupportedExtensions();
this.supportedExtensions = exts;
var angleString = 'ANGLE_instanced_arrays';
this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
var vaoString = 'OES_vertex_array_object';
this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
},
/**
* Sets the handlers that are called when WebGL context is lost or restored by the browser.
*
@ -180393,7 +180427,7 @@ var WebGLRenderer = new Class({
this.resize(this.game.scale.baseSize.width, this.game.scale.baseSize.height);
// Restore GL extensions.
this.init.setupExtensions();
this.setExtensions();
// Context has been restored.

2
dist/phaser.min.js vendored

File diff suppressed because one or more lines are too long

33305
types/phaser.d.ts vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long