Skip to content

Commit

Permalink
v3.85.2
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Sep 17, 2024
1 parent d6ccb63 commit 580ff30
Show file tree
Hide file tree
Showing 10 changed files with 210,800 additions and 210,593 deletions.
112 changes: 73 additions & 39 deletions dist/phaser-arcade-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -15645,7 +15645,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.85.1',
VERSION: '3.85.2',

BlendModes: __webpack_require__(10312),

Expand Down Expand Up @@ -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);

// Calculate the offset caused by rounding
var dx = rx0 - x0;
var dy = ry0 - y0;

quad[2] = Math.floor((x * a + yh * c + e) + 0.5);
quad[3] = Math.floor((x * b + yh * d + f) + 0.5);
// Adjust the other corners by the same offset
quad[0] = rx0;
quad[1] = ry0;

quad[4] = Math.floor((xw * a + yh * c + e) + 0.5);
quad[5] = Math.floor((xw * b + yh * d + f) + 0.5);
quad[2] = x1 + dx;
quad[3] = y1 + dy;

quad[6] = Math.floor((xw * a + y * c + e) + 0.5);
quad[7] = Math.floor((xw * b + y * d + f) + 0.5);
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;
Expand Down Expand Up @@ -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[]}
Expand All @@ -161624,6 +161646,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}
Expand All @@ -161635,6 +161659,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}
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion dist/phaser-arcade-physics.min.js

Large diffs are not rendered by default.

112 changes: 73 additions & 39 deletions dist/phaser-ie9.js
Original file line number Diff line number Diff line change
Expand Up @@ -15645,7 +15645,7 @@ var CONST = {
* @type {string}
* @since 3.0.0
*/
VERSION: '3.85.1',
VERSION: '3.85.2',

BlendModes: __webpack_require__(10312),

Expand Down Expand Up @@ -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);

// Calculate the offset caused by rounding
var dx = rx0 - x0;
var dy = ry0 - y0;

quad[2] = Math.floor((x * a + yh * c + e) + 0.5);
quad[3] = Math.floor((x * b + yh * d + f) + 0.5);
// Adjust the other corners by the same offset
quad[0] = rx0;
quad[1] = ry0;

quad[4] = Math.floor((xw * a + yh * c + e) + 0.5);
quad[5] = Math.floor((xw * b + yh * d + f) + 0.5);
quad[2] = x1 + dx;
quad[3] = y1 + dy;

quad[6] = Math.floor((xw * a + y * c + e) + 0.5);
quad[7] = Math.floor((xw * b + y * d + f) + 0.5);
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;
Expand Down Expand Up @@ -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[]}
Expand All @@ -180170,6 +180192,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}
Expand All @@ -180181,6 +180205,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}
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion dist/phaser-ie9.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 580ff30

Please sign in to comment.