mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
v3.60 Beta 21 Release
This commit is contained in:
parent
23d255ef38
commit
78b8d40d91
9 changed files with 3637 additions and 1214 deletions
366
dist/phaser-arcade-physics.js
vendored
366
dist/phaser-arcade-physics.js
vendored
|
@ -42623,12 +42623,12 @@ var GetBounds = {
|
|||
* @private
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
prepareBoundsOutput: function (output, includeParent)
|
||||
{
|
||||
|
@ -42651,40 +42651,45 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getCenter
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getCenter: function (output)
|
||||
getCenter: function (output, includeParent)
|
||||
{
|
||||
if (output === undefined) { output = new Vector2(); }
|
||||
|
||||
output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);
|
||||
output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);
|
||||
|
||||
return output;
|
||||
return this.prepareBoundsOutput(output, includeParent);
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the top-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42698,17 +42703,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42722,17 +42729,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42746,17 +42755,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the left-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getLeftCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getLeftCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42770,17 +42781,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the right-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getRightCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getRightCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42794,17 +42807,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42818,17 +42833,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42842,17 +42859,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42866,6 +42885,7 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bounds of this Game Object, regardless of origin.
|
||||
*
|
||||
* The values are stored and returned in a Rectangle, or Rectangle-like, object.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBounds
|
||||
|
@ -58012,6 +58032,10 @@ var Mesh = new Class({
|
|||
*/
|
||||
this.fov;
|
||||
|
||||
// Set these to allow setInteractive to work
|
||||
this.displayOriginX = 0;
|
||||
this.displayOriginY = 0;
|
||||
|
||||
var renderer = scene.sys.renderer;
|
||||
|
||||
this.setPosition(x, y);
|
||||
|
@ -58794,6 +58818,44 @@ var Mesh = new Class({
|
|||
return this.setTint();
|
||||
},
|
||||
|
||||
/**
|
||||
* Pass this Mesh Game Object to the Input Manager to enable it for Input.
|
||||
*
|
||||
* Unlike other Game Objects, the Mesh Game Object uses its own special hit area callback, which you cannot override.
|
||||
*
|
||||
* @example
|
||||
* mesh.setInteractive();
|
||||
*
|
||||
* @method Phaser.GameObjects.Mesh#setInteractive
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This GameObject.
|
||||
*/
|
||||
setInteractive: function ()
|
||||
{
|
||||
var faces = this.faces;
|
||||
|
||||
var hitAreaCallback = function (area, x, y)
|
||||
{
|
||||
for (var i = 0; i < faces.length; i++)
|
||||
{
|
||||
var face = faces[i];
|
||||
|
||||
// Don't pass a calcMatrix, as the x/y are already transformed
|
||||
if (face.contains(x, y))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
this.scene.sys.input.enable(this, hitAreaCallback);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets an additive tint on all vertices of this Mesh Game Object.
|
||||
*
|
||||
|
@ -59602,6 +59664,8 @@ var NineSlice = new Class({
|
|||
|
||||
this.setSlices(width, height, leftWidth, rightWidth, topHeight, bottomHeight);
|
||||
|
||||
this.setOrigin(0.5, 0.5);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline();
|
||||
},
|
||||
|
@ -68081,10 +68145,6 @@ var UUID = __webpack_require__(76583);
|
|||
* The Plane Game Object also has the Animation component, allowing you to play animations
|
||||
* across the Plane just as you would with a Sprite.
|
||||
*
|
||||
* While a Plane cannot be enabled for input it does have the methods `hasFaceAt` and
|
||||
* `getFaceAt` which can be used with Pointer coordinates to detect if they have clicked
|
||||
* on Plane face, or not.
|
||||
*
|
||||
* Note that the Plane object is WebGL only and does not have a Canvas counterpart.
|
||||
*
|
||||
* The Plane origin is always 0.5 x 0.5 and cannot be changed.
|
||||
|
@ -146899,8 +146959,6 @@ var World = new Class({
|
|||
var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle);
|
||||
var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle);
|
||||
|
||||
console.log('overlap', overlap, 'xy', overlapX, overlapY);
|
||||
|
||||
var results = { overlap: overlap, result: false, x: overlapX, y: overlapY };
|
||||
|
||||
// We know the AABBs already intersect before we enter this method
|
||||
|
@ -146944,15 +147002,11 @@ var World = new Class({
|
|||
p *= 2;
|
||||
}
|
||||
|
||||
console.log('circ vel', body1Velocity, body2Velocity, 'p', p, 'nxy', nx, ny);
|
||||
|
||||
if (!body1Immovable)
|
||||
{
|
||||
body1Velocity.x = (body1Velocity.x - p / body1.mass * nx);
|
||||
body1Velocity.y = (body1Velocity.y - p / body1.mass * ny);
|
||||
body1Velocity.multiply(body1.bounce);
|
||||
|
||||
console.log('body1', body1Velocity, 'y', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -146960,8 +147014,6 @@ var World = new Class({
|
|||
body2Velocity.x = (body2Velocity.x + p / body2.mass * nx);
|
||||
body2Velocity.y = (body2Velocity.y + p / body2.mass * ny);
|
||||
body2Velocity.multiply(body2.bounce);
|
||||
|
||||
console.log('body2', body2Velocity, 'y', body2.y);
|
||||
}
|
||||
|
||||
if (!body1Immovable && !body2Immovable)
|
||||
|
@ -146976,8 +147028,6 @@ var World = new Class({
|
|||
body1.y -= overlapY;
|
||||
|
||||
body1.updateCenter();
|
||||
|
||||
console.log('body1 sep', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -162816,7 +162866,7 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* This array is intentionally sparse. Do not adjust.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#glow
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#fxHandlers
|
||||
* @type {function[]}
|
||||
* @since 3.60.0
|
||||
*/
|
||||
|
@ -162918,7 +162968,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGlow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Glow} config - The Glow FX controller.
|
||||
* @param {Phaser.FX.Glow} config - The Glow FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -162939,7 +162989,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShadow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shadow} config - The Shadow FX controller.
|
||||
* @param {Phaser.FX.Shadow} config - The Shadow FX controller.
|
||||
*/
|
||||
onShadow: function (config)
|
||||
{
|
||||
|
@ -162958,7 +163008,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onPixelate
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {Phaser.FX.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -162979,7 +163029,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onVignette
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Vignette} config - The Vignette FX controller.
|
||||
* @param {Phaser.FX.Vignette} config - The Vignette FX controller.
|
||||
*/
|
||||
onVignette: function (config)
|
||||
{
|
||||
|
@ -162998,7 +163048,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShine
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shine} config - The Shine FX controller.
|
||||
* @param {Phaser.FX.Shine} config - The Shine FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -163019,7 +163069,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBlur
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Blur} config - The Blur FX controller.
|
||||
* @param {Phaser.FX.Blur} config - The Blur FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -163056,7 +163106,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGradient
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Gradient} config - The Gradient FX controller.
|
||||
* @param {Phaser.FX.Gradient} config - The Gradient FX controller.
|
||||
*/
|
||||
onGradient: function (config)
|
||||
{
|
||||
|
@ -163075,7 +163125,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBloom
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bloom} config - The Bloom FX controller.
|
||||
* @param {Phaser.FX.Bloom} config - The Bloom FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -163114,7 +163164,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onColorMatrix
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
* @param {Phaser.FX.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
*/
|
||||
onColorMatrix: function (config)
|
||||
{
|
||||
|
@ -163132,7 +163182,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onCircle
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Circle} config - The Circle FX controller.
|
||||
* @param {Phaser.FX.Circle} config - The Circle FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -163153,7 +163203,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBarrel
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Barrel} config - The Barrel FX controller.
|
||||
* @param {Phaser.FX.Barrel} config - The Barrel FX controller.
|
||||
*/
|
||||
onBarrel: function (config)
|
||||
{
|
||||
|
@ -163172,7 +163222,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onDisplacement
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Displacement} config - The Displacement FX controller.
|
||||
* @param {Phaser.FX.Displacement} config - The Displacement FX controller.
|
||||
*/
|
||||
onDisplacement: function (config)
|
||||
{
|
||||
|
@ -163192,7 +163242,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onWipe
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Wipe} config - The Wipe FX controller.
|
||||
* @param {Phaser.FX.Wipe} config - The Wipe FX controller.
|
||||
*/
|
||||
onWipe: function (config)
|
||||
{
|
||||
|
@ -163211,7 +163261,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBokeh
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bokeh} config - The Bokeh FX controller.
|
||||
* @param {Phaser.FX.Bokeh} config - The Bokeh FX controller.
|
||||
*/
|
||||
onBokeh: function (config, width, height)
|
||||
{
|
||||
|
@ -163229,6 +163279,8 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -163249,6 +163301,8 @@ var FXPipeline = new Class({
|
|||
this.swap = null;
|
||||
|
||||
PreFXPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -165699,6 +165753,8 @@ var PostFXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.PostFXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -165713,6 +165769,8 @@ var PostFXPipeline = new Class({
|
|||
this.halfFrame2 = null;
|
||||
|
||||
WebGLPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -195911,7 +195969,14 @@ var ObjectHelper = new Class({
|
|||
|
||||
for (var key in properties)
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
if (sprite[key] !== undefined)
|
||||
{
|
||||
sprite[key] = properties[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -199761,6 +199826,7 @@ var Vector2 = __webpack_require__(93736);
|
|||
* @extends Phaser.GameObjects.Components.Mask
|
||||
* @extends Phaser.GameObjects.Components.Origin
|
||||
* @extends Phaser.GameObjects.Components.Pipeline
|
||||
* @extends Phaser.GameObjects.Components.PostPipeline
|
||||
* @extends Phaser.GameObjects.Components.ScrollFactor
|
||||
* @extends Phaser.GameObjects.Components.Transform
|
||||
* @extends Phaser.GameObjects.Components.Visible
|
||||
|
@ -199786,6 +199852,7 @@ var TilemapLayer = new Class({
|
|||
Components.Mask,
|
||||
Components.Origin,
|
||||
Components.Pipeline,
|
||||
Components.PostPipeline,
|
||||
Components.Transform,
|
||||
Components.Visible,
|
||||
Components.ScrollFactor,
|
||||
|
@ -200031,6 +200098,7 @@ var TilemapLayer = new Class({
|
|||
this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline(false);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -203696,16 +203764,21 @@ var HexagonalCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
@ -204017,103 +204090,101 @@ var IsometricCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
var mapData = layer.data;
|
||||
var mapWidth = layer.width;
|
||||
var mapHeight = layer.height;
|
||||
var skipCull = tilemapLayer.skipCull;
|
||||
|
||||
var drawLeft = 0;
|
||||
var drawRight = mapWidth;
|
||||
var drawTop = 0;
|
||||
var drawBottom = mapHeight;
|
||||
|
||||
if (!tilemapLayer.skipCull)
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
|
||||
if (renderOrder === 0)
|
||||
{
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
// right-down
|
||||
|
||||
if (renderOrder === 0)
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// right-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -205692,16 +205763,21 @@ var StaggeredCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
|
2
dist/phaser-arcade-physics.min.js
vendored
2
dist/phaser-arcade-physics.min.js
vendored
File diff suppressed because one or more lines are too long
375
dist/phaser-ie9.js
vendored
375
dist/phaser-ie9.js
vendored
|
@ -42623,12 +42623,12 @@ var GetBounds = {
|
|||
* @private
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
prepareBoundsOutput: function (output, includeParent)
|
||||
{
|
||||
|
@ -42651,40 +42651,45 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getCenter
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getCenter: function (output)
|
||||
getCenter: function (output, includeParent)
|
||||
{
|
||||
if (output === undefined) { output = new Vector2(); }
|
||||
|
||||
output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);
|
||||
output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);
|
||||
|
||||
return output;
|
||||
return this.prepareBoundsOutput(output, includeParent);
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the top-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42698,17 +42703,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42722,17 +42729,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42746,17 +42755,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the left-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getLeftCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getLeftCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42770,17 +42781,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the right-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getRightCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getRightCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42794,17 +42807,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42818,17 +42833,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42842,17 +42859,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42866,6 +42885,7 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bounds of this Game Object, regardless of origin.
|
||||
*
|
||||
* The values are stored and returned in a Rectangle, or Rectangle-like, object.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBounds
|
||||
|
@ -58012,6 +58032,10 @@ var Mesh = new Class({
|
|||
*/
|
||||
this.fov;
|
||||
|
||||
// Set these to allow setInteractive to work
|
||||
this.displayOriginX = 0;
|
||||
this.displayOriginY = 0;
|
||||
|
||||
var renderer = scene.sys.renderer;
|
||||
|
||||
this.setPosition(x, y);
|
||||
|
@ -58794,6 +58818,44 @@ var Mesh = new Class({
|
|||
return this.setTint();
|
||||
},
|
||||
|
||||
/**
|
||||
* Pass this Mesh Game Object to the Input Manager to enable it for Input.
|
||||
*
|
||||
* Unlike other Game Objects, the Mesh Game Object uses its own special hit area callback, which you cannot override.
|
||||
*
|
||||
* @example
|
||||
* mesh.setInteractive();
|
||||
*
|
||||
* @method Phaser.GameObjects.Mesh#setInteractive
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This GameObject.
|
||||
*/
|
||||
setInteractive: function ()
|
||||
{
|
||||
var faces = this.faces;
|
||||
|
||||
var hitAreaCallback = function (area, x, y)
|
||||
{
|
||||
for (var i = 0; i < faces.length; i++)
|
||||
{
|
||||
var face = faces[i];
|
||||
|
||||
// Don't pass a calcMatrix, as the x/y are already transformed
|
||||
if (face.contains(x, y))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
this.scene.sys.input.enable(this, hitAreaCallback);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets an additive tint on all vertices of this Mesh Game Object.
|
||||
*
|
||||
|
@ -59602,6 +59664,8 @@ var NineSlice = new Class({
|
|||
|
||||
this.setSlices(width, height, leftWidth, rightWidth, topHeight, bottomHeight);
|
||||
|
||||
this.setOrigin(0.5, 0.5);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline();
|
||||
},
|
||||
|
@ -68081,10 +68145,6 @@ var UUID = __webpack_require__(76583);
|
|||
* The Plane Game Object also has the Animation component, allowing you to play animations
|
||||
* across the Plane just as you would with a Sprite.
|
||||
*
|
||||
* While a Plane cannot be enabled for input it does have the methods `hasFaceAt` and
|
||||
* `getFaceAt` which can be used with Pointer coordinates to detect if they have clicked
|
||||
* on Plane face, or not.
|
||||
*
|
||||
* Note that the Plane object is WebGL only and does not have a Canvas counterpart.
|
||||
*
|
||||
* The Plane origin is always 0.5 x 0.5 and cannot be changed.
|
||||
|
@ -146898,8 +146958,6 @@ var World = new Class({
|
|||
var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle);
|
||||
var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle);
|
||||
|
||||
console.log('overlap', overlap, 'xy', overlapX, overlapY);
|
||||
|
||||
var results = { overlap: overlap, result: false, x: overlapX, y: overlapY };
|
||||
|
||||
// We know the AABBs already intersect before we enter this method
|
||||
|
@ -146943,15 +147001,11 @@ var World = new Class({
|
|||
p *= 2;
|
||||
}
|
||||
|
||||
console.log('circ vel', body1Velocity, body2Velocity, 'p', p, 'nxy', nx, ny);
|
||||
|
||||
if (!body1Immovable)
|
||||
{
|
||||
body1Velocity.x = (body1Velocity.x - p / body1.mass * nx);
|
||||
body1Velocity.y = (body1Velocity.y - p / body1.mass * ny);
|
||||
body1Velocity.multiply(body1.bounce);
|
||||
|
||||
console.log('body1', body1Velocity, 'y', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -146959,8 +147013,6 @@ var World = new Class({
|
|||
body2Velocity.x = (body2Velocity.x + p / body2.mass * nx);
|
||||
body2Velocity.y = (body2Velocity.y + p / body2.mass * ny);
|
||||
body2Velocity.multiply(body2.bounce);
|
||||
|
||||
console.log('body2', body2Velocity, 'y', body2.y);
|
||||
}
|
||||
|
||||
if (!body1Immovable && !body2Immovable)
|
||||
|
@ -146975,8 +147027,6 @@ var World = new Class({
|
|||
body1.y -= overlapY;
|
||||
|
||||
body1.updateCenter();
|
||||
|
||||
console.log('body1 sep', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -153612,6 +153662,15 @@ var MatterTileBody = new Class({
|
|||
{
|
||||
this.setBody(body, addToWorld);
|
||||
}
|
||||
|
||||
if (tile.flipX || tile.flipY)
|
||||
{
|
||||
var rotationPoint = { x: tile.getCenterX(), y: tile.getCenterY() };
|
||||
var scaleX = (tile.flipX) ? -1 : 1;
|
||||
var scaleY = (tile.flipY) ? -1 : 1;
|
||||
|
||||
Body.scale(body, scaleX, scaleY, rotationPoint);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -181034,7 +181093,7 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* This array is intentionally sparse. Do not adjust.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#glow
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#fxHandlers
|
||||
* @type {function[]}
|
||||
* @since 3.60.0
|
||||
*/
|
||||
|
@ -181136,7 +181195,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGlow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Glow} config - The Glow FX controller.
|
||||
* @param {Phaser.FX.Glow} config - The Glow FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -181157,7 +181216,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShadow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shadow} config - The Shadow FX controller.
|
||||
* @param {Phaser.FX.Shadow} config - The Shadow FX controller.
|
||||
*/
|
||||
onShadow: function (config)
|
||||
{
|
||||
|
@ -181176,7 +181235,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onPixelate
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {Phaser.FX.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -181197,7 +181256,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onVignette
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Vignette} config - The Vignette FX controller.
|
||||
* @param {Phaser.FX.Vignette} config - The Vignette FX controller.
|
||||
*/
|
||||
onVignette: function (config)
|
||||
{
|
||||
|
@ -181216,7 +181275,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShine
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shine} config - The Shine FX controller.
|
||||
* @param {Phaser.FX.Shine} config - The Shine FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -181237,7 +181296,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBlur
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Blur} config - The Blur FX controller.
|
||||
* @param {Phaser.FX.Blur} config - The Blur FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -181274,7 +181333,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGradient
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Gradient} config - The Gradient FX controller.
|
||||
* @param {Phaser.FX.Gradient} config - The Gradient FX controller.
|
||||
*/
|
||||
onGradient: function (config)
|
||||
{
|
||||
|
@ -181293,7 +181352,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBloom
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bloom} config - The Bloom FX controller.
|
||||
* @param {Phaser.FX.Bloom} config - The Bloom FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -181332,7 +181391,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onColorMatrix
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
* @param {Phaser.FX.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
*/
|
||||
onColorMatrix: function (config)
|
||||
{
|
||||
|
@ -181350,7 +181409,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onCircle
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Circle} config - The Circle FX controller.
|
||||
* @param {Phaser.FX.Circle} config - The Circle FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -181371,7 +181430,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBarrel
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Barrel} config - The Barrel FX controller.
|
||||
* @param {Phaser.FX.Barrel} config - The Barrel FX controller.
|
||||
*/
|
||||
onBarrel: function (config)
|
||||
{
|
||||
|
@ -181390,7 +181449,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onDisplacement
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Displacement} config - The Displacement FX controller.
|
||||
* @param {Phaser.FX.Displacement} config - The Displacement FX controller.
|
||||
*/
|
||||
onDisplacement: function (config)
|
||||
{
|
||||
|
@ -181410,7 +181469,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onWipe
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Wipe} config - The Wipe FX controller.
|
||||
* @param {Phaser.FX.Wipe} config - The Wipe FX controller.
|
||||
*/
|
||||
onWipe: function (config)
|
||||
{
|
||||
|
@ -181429,7 +181488,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBokeh
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bokeh} config - The Bokeh FX controller.
|
||||
* @param {Phaser.FX.Bokeh} config - The Bokeh FX controller.
|
||||
*/
|
||||
onBokeh: function (config, width, height)
|
||||
{
|
||||
|
@ -181447,6 +181506,8 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -181467,6 +181528,8 @@ var FXPipeline = new Class({
|
|||
this.swap = null;
|
||||
|
||||
PreFXPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -183917,6 +183980,8 @@ var PostFXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.PostFXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -183931,6 +183996,8 @@ var PostFXPipeline = new Class({
|
|||
this.halfFrame2 = null;
|
||||
|
||||
WebGLPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -214129,7 +214196,14 @@ var ObjectHelper = new Class({
|
|||
|
||||
for (var key in properties)
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
if (sprite[key] !== undefined)
|
||||
{
|
||||
sprite[key] = properties[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -217979,6 +218053,7 @@ var Vector2 = __webpack_require__(93736);
|
|||
* @extends Phaser.GameObjects.Components.Mask
|
||||
* @extends Phaser.GameObjects.Components.Origin
|
||||
* @extends Phaser.GameObjects.Components.Pipeline
|
||||
* @extends Phaser.GameObjects.Components.PostPipeline
|
||||
* @extends Phaser.GameObjects.Components.ScrollFactor
|
||||
* @extends Phaser.GameObjects.Components.Transform
|
||||
* @extends Phaser.GameObjects.Components.Visible
|
||||
|
@ -218004,6 +218079,7 @@ var TilemapLayer = new Class({
|
|||
Components.Mask,
|
||||
Components.Origin,
|
||||
Components.Pipeline,
|
||||
Components.PostPipeline,
|
||||
Components.Transform,
|
||||
Components.Visible,
|
||||
Components.ScrollFactor,
|
||||
|
@ -218249,6 +218325,7 @@ var TilemapLayer = new Class({
|
|||
this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline(false);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -221914,16 +221991,21 @@ var HexagonalCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
@ -222235,103 +222317,101 @@ var IsometricCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
var mapData = layer.data;
|
||||
var mapWidth = layer.width;
|
||||
var mapHeight = layer.height;
|
||||
var skipCull = tilemapLayer.skipCull;
|
||||
|
||||
var drawLeft = 0;
|
||||
var drawRight = mapWidth;
|
||||
var drawTop = 0;
|
||||
var drawBottom = mapHeight;
|
||||
|
||||
if (!tilemapLayer.skipCull)
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
|
||||
if (renderOrder === 0)
|
||||
{
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
// right-down
|
||||
|
||||
if (renderOrder === 0)
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// right-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -223910,16 +223990,21 @@ var StaggeredCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
|
2
dist/phaser-ie9.min.js
vendored
2
dist/phaser-ie9.min.js
vendored
File diff suppressed because one or more lines are too long
375
dist/phaser.esm.js
vendored
375
dist/phaser.esm.js
vendored
|
@ -42611,12 +42611,12 @@ var GetBounds = {
|
|||
* @private
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
prepareBoundsOutput: function (output, includeParent)
|
||||
{
|
||||
|
@ -42639,40 +42639,45 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getCenter
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getCenter: function (output)
|
||||
getCenter: function (output, includeParent)
|
||||
{
|
||||
if (output === undefined) { output = new Vector2(); }
|
||||
|
||||
output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);
|
||||
output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);
|
||||
|
||||
return output;
|
||||
return this.prepareBoundsOutput(output, includeParent);
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the top-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42686,17 +42691,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42710,17 +42717,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42734,17 +42743,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the left-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getLeftCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getLeftCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42758,17 +42769,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the right-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getRightCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getRightCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42782,17 +42795,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42806,17 +42821,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42830,17 +42847,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42854,6 +42873,7 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bounds of this Game Object, regardless of origin.
|
||||
*
|
||||
* The values are stored and returned in a Rectangle, or Rectangle-like, object.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBounds
|
||||
|
@ -58000,6 +58020,10 @@ var Mesh = new Class({
|
|||
*/
|
||||
this.fov;
|
||||
|
||||
// Set these to allow setInteractive to work
|
||||
this.displayOriginX = 0;
|
||||
this.displayOriginY = 0;
|
||||
|
||||
var renderer = scene.sys.renderer;
|
||||
|
||||
this.setPosition(x, y);
|
||||
|
@ -58782,6 +58806,44 @@ var Mesh = new Class({
|
|||
return this.setTint();
|
||||
},
|
||||
|
||||
/**
|
||||
* Pass this Mesh Game Object to the Input Manager to enable it for Input.
|
||||
*
|
||||
* Unlike other Game Objects, the Mesh Game Object uses its own special hit area callback, which you cannot override.
|
||||
*
|
||||
* @example
|
||||
* mesh.setInteractive();
|
||||
*
|
||||
* @method Phaser.GameObjects.Mesh#setInteractive
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This GameObject.
|
||||
*/
|
||||
setInteractive: function ()
|
||||
{
|
||||
var faces = this.faces;
|
||||
|
||||
var hitAreaCallback = function (area, x, y)
|
||||
{
|
||||
for (var i = 0; i < faces.length; i++)
|
||||
{
|
||||
var face = faces[i];
|
||||
|
||||
// Don't pass a calcMatrix, as the x/y are already transformed
|
||||
if (face.contains(x, y))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
this.scene.sys.input.enable(this, hitAreaCallback);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets an additive tint on all vertices of this Mesh Game Object.
|
||||
*
|
||||
|
@ -59590,6 +59652,8 @@ var NineSlice = new Class({
|
|||
|
||||
this.setSlices(width, height, leftWidth, rightWidth, topHeight, bottomHeight);
|
||||
|
||||
this.setOrigin(0.5, 0.5);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline();
|
||||
},
|
||||
|
@ -68069,10 +68133,6 @@ var UUID = __webpack_require__(76583);
|
|||
* The Plane Game Object also has the Animation component, allowing you to play animations
|
||||
* across the Plane just as you would with a Sprite.
|
||||
*
|
||||
* While a Plane cannot be enabled for input it does have the methods `hasFaceAt` and
|
||||
* `getFaceAt` which can be used with Pointer coordinates to detect if they have clicked
|
||||
* on Plane face, or not.
|
||||
*
|
||||
* Note that the Plane object is WebGL only and does not have a Canvas counterpart.
|
||||
*
|
||||
* The Plane origin is always 0.5 x 0.5 and cannot be changed.
|
||||
|
@ -146791,8 +146851,6 @@ var World = new Class({
|
|||
var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle);
|
||||
var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle);
|
||||
|
||||
console.log('overlap', overlap, 'xy', overlapX, overlapY);
|
||||
|
||||
var results = { overlap: overlap, result: false, x: overlapX, y: overlapY };
|
||||
|
||||
// We know the AABBs already intersect before we enter this method
|
||||
|
@ -146836,15 +146894,11 @@ var World = new Class({
|
|||
p *= 2;
|
||||
}
|
||||
|
||||
console.log('circ vel', body1Velocity, body2Velocity, 'p', p, 'nxy', nx, ny);
|
||||
|
||||
if (!body1Immovable)
|
||||
{
|
||||
body1Velocity.x = (body1Velocity.x - p / body1.mass * nx);
|
||||
body1Velocity.y = (body1Velocity.y - p / body1.mass * ny);
|
||||
body1Velocity.multiply(body1.bounce);
|
||||
|
||||
console.log('body1', body1Velocity, 'y', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -146852,8 +146906,6 @@ var World = new Class({
|
|||
body2Velocity.x = (body2Velocity.x + p / body2.mass * nx);
|
||||
body2Velocity.y = (body2Velocity.y + p / body2.mass * ny);
|
||||
body2Velocity.multiply(body2.bounce);
|
||||
|
||||
console.log('body2', body2Velocity, 'y', body2.y);
|
||||
}
|
||||
|
||||
if (!body1Immovable && !body2Immovable)
|
||||
|
@ -146868,8 +146920,6 @@ var World = new Class({
|
|||
body1.y -= overlapY;
|
||||
|
||||
body1.updateCenter();
|
||||
|
||||
console.log('body1 sep', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -153505,6 +153555,15 @@ var MatterTileBody = new Class({
|
|||
{
|
||||
this.setBody(body, addToWorld);
|
||||
}
|
||||
|
||||
if (tile.flipX || tile.flipY)
|
||||
{
|
||||
var rotationPoint = { x: tile.getCenterX(), y: tile.getCenterY() };
|
||||
var scaleX = (tile.flipX) ? -1 : 1;
|
||||
var scaleY = (tile.flipY) ? -1 : 1;
|
||||
|
||||
Body.scale(body, scaleX, scaleY, rotationPoint);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -180485,7 +180544,7 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* This array is intentionally sparse. Do not adjust.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#glow
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#fxHandlers
|
||||
* @type {function[]}
|
||||
* @since 3.60.0
|
||||
*/
|
||||
|
@ -180587,7 +180646,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGlow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Glow} config - The Glow FX controller.
|
||||
* @param {Phaser.FX.Glow} config - The Glow FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180608,7 +180667,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShadow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shadow} config - The Shadow FX controller.
|
||||
* @param {Phaser.FX.Shadow} config - The Shadow FX controller.
|
||||
*/
|
||||
onShadow: function (config)
|
||||
{
|
||||
|
@ -180627,7 +180686,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onPixelate
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {Phaser.FX.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180648,7 +180707,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onVignette
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Vignette} config - The Vignette FX controller.
|
||||
* @param {Phaser.FX.Vignette} config - The Vignette FX controller.
|
||||
*/
|
||||
onVignette: function (config)
|
||||
{
|
||||
|
@ -180667,7 +180726,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShine
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shine} config - The Shine FX controller.
|
||||
* @param {Phaser.FX.Shine} config - The Shine FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180688,7 +180747,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBlur
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Blur} config - The Blur FX controller.
|
||||
* @param {Phaser.FX.Blur} config - The Blur FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180725,7 +180784,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGradient
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Gradient} config - The Gradient FX controller.
|
||||
* @param {Phaser.FX.Gradient} config - The Gradient FX controller.
|
||||
*/
|
||||
onGradient: function (config)
|
||||
{
|
||||
|
@ -180744,7 +180803,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBloom
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bloom} config - The Bloom FX controller.
|
||||
* @param {Phaser.FX.Bloom} config - The Bloom FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180783,7 +180842,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onColorMatrix
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
* @param {Phaser.FX.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
*/
|
||||
onColorMatrix: function (config)
|
||||
{
|
||||
|
@ -180801,7 +180860,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onCircle
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Circle} config - The Circle FX controller.
|
||||
* @param {Phaser.FX.Circle} config - The Circle FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180822,7 +180881,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBarrel
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Barrel} config - The Barrel FX controller.
|
||||
* @param {Phaser.FX.Barrel} config - The Barrel FX controller.
|
||||
*/
|
||||
onBarrel: function (config)
|
||||
{
|
||||
|
@ -180841,7 +180900,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onDisplacement
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Displacement} config - The Displacement FX controller.
|
||||
* @param {Phaser.FX.Displacement} config - The Displacement FX controller.
|
||||
*/
|
||||
onDisplacement: function (config)
|
||||
{
|
||||
|
@ -180861,7 +180920,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onWipe
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Wipe} config - The Wipe FX controller.
|
||||
* @param {Phaser.FX.Wipe} config - The Wipe FX controller.
|
||||
*/
|
||||
onWipe: function (config)
|
||||
{
|
||||
|
@ -180880,7 +180939,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBokeh
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bokeh} config - The Bokeh FX controller.
|
||||
* @param {Phaser.FX.Bokeh} config - The Bokeh FX controller.
|
||||
*/
|
||||
onBokeh: function (config, width, height)
|
||||
{
|
||||
|
@ -180898,6 +180957,8 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -180918,6 +180979,8 @@ var FXPipeline = new Class({
|
|||
this.swap = null;
|
||||
|
||||
PreFXPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -183368,6 +183431,8 @@ var PostFXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.PostFXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -183382,6 +183447,8 @@ var PostFXPipeline = new Class({
|
|||
this.halfFrame2 = null;
|
||||
|
||||
WebGLPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -213580,7 +213647,14 @@ var ObjectHelper = new Class({
|
|||
|
||||
for (var key in properties)
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
if (sprite[key] !== undefined)
|
||||
{
|
||||
sprite[key] = properties[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -217430,6 +217504,7 @@ var Vector2 = __webpack_require__(93736);
|
|||
* @extends Phaser.GameObjects.Components.Mask
|
||||
* @extends Phaser.GameObjects.Components.Origin
|
||||
* @extends Phaser.GameObjects.Components.Pipeline
|
||||
* @extends Phaser.GameObjects.Components.PostPipeline
|
||||
* @extends Phaser.GameObjects.Components.ScrollFactor
|
||||
* @extends Phaser.GameObjects.Components.Transform
|
||||
* @extends Phaser.GameObjects.Components.Visible
|
||||
|
@ -217455,6 +217530,7 @@ var TilemapLayer = new Class({
|
|||
Components.Mask,
|
||||
Components.Origin,
|
||||
Components.Pipeline,
|
||||
Components.PostPipeline,
|
||||
Components.Transform,
|
||||
Components.Visible,
|
||||
Components.ScrollFactor,
|
||||
|
@ -217700,6 +217776,7 @@ var TilemapLayer = new Class({
|
|||
this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline(false);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -221365,16 +221442,21 @@ var HexagonalCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
@ -221686,103 +221768,101 @@ var IsometricCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
var mapData = layer.data;
|
||||
var mapWidth = layer.width;
|
||||
var mapHeight = layer.height;
|
||||
var skipCull = tilemapLayer.skipCull;
|
||||
|
||||
var drawLeft = 0;
|
||||
var drawRight = mapWidth;
|
||||
var drawTop = 0;
|
||||
var drawBottom = mapHeight;
|
||||
|
||||
if (!tilemapLayer.skipCull)
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
|
||||
if (renderOrder === 0)
|
||||
{
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
// right-down
|
||||
|
||||
if (renderOrder === 0)
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// right-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -223361,16 +223441,21 @@ var StaggeredCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
|
2
dist/phaser.esm.min.js
vendored
2
dist/phaser.esm.min.js
vendored
File diff suppressed because one or more lines are too long
375
dist/phaser.js
vendored
375
dist/phaser.js
vendored
|
@ -42623,12 +42623,12 @@ var GetBounds = {
|
|||
* @private
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
prepareBoundsOutput: function (output, includeParent)
|
||||
{
|
||||
|
@ -42651,40 +42651,45 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getCenter
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getCenter: function (output)
|
||||
getCenter: function (output, includeParent)
|
||||
{
|
||||
if (output === undefined) { output = new Vector2(); }
|
||||
|
||||
output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);
|
||||
output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);
|
||||
|
||||
return output;
|
||||
return this.prepareBoundsOutput(output, includeParent);
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the top-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42698,17 +42703,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42722,17 +42729,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the top-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getTopRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getTopRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42746,17 +42755,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the left-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getLeftCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getLeftCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42770,17 +42781,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the right-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getRightCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getRightCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42794,17 +42807,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomLeft
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomLeft: function (output, includeParent)
|
||||
{
|
||||
|
@ -42818,17 +42833,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-center coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomCenter
|
||||
* @since 3.18.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomCenter: function (output, includeParent)
|
||||
{
|
||||
|
@ -42842,17 +42859,19 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
|
||||
* The returned point is calculated in local space and does not factor in any parent containers
|
||||
*
|
||||
* The returned point is calculated in local space and does not factor in any parent Containers,
|
||||
* unless the `includeParent` argument is set to `true`.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBottomRight
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Math.Vector2} O - [output,$return]
|
||||
* @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.
|
||||
* @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?
|
||||
*
|
||||
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
|
||||
* @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.
|
||||
*/
|
||||
getBottomRight: function (output, includeParent)
|
||||
{
|
||||
|
@ -42866,6 +42885,7 @@ var GetBounds = {
|
|||
|
||||
/**
|
||||
* Gets the bounds of this Game Object, regardless of origin.
|
||||
*
|
||||
* The values are stored and returned in a Rectangle, or Rectangle-like, object.
|
||||
*
|
||||
* @method Phaser.GameObjects.Components.GetBounds#getBounds
|
||||
|
@ -58012,6 +58032,10 @@ var Mesh = new Class({
|
|||
*/
|
||||
this.fov;
|
||||
|
||||
// Set these to allow setInteractive to work
|
||||
this.displayOriginX = 0;
|
||||
this.displayOriginY = 0;
|
||||
|
||||
var renderer = scene.sys.renderer;
|
||||
|
||||
this.setPosition(x, y);
|
||||
|
@ -58794,6 +58818,44 @@ var Mesh = new Class({
|
|||
return this.setTint();
|
||||
},
|
||||
|
||||
/**
|
||||
* Pass this Mesh Game Object to the Input Manager to enable it for Input.
|
||||
*
|
||||
* Unlike other Game Objects, the Mesh Game Object uses its own special hit area callback, which you cannot override.
|
||||
*
|
||||
* @example
|
||||
* mesh.setInteractive();
|
||||
*
|
||||
* @method Phaser.GameObjects.Mesh#setInteractive
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This GameObject.
|
||||
*/
|
||||
setInteractive: function ()
|
||||
{
|
||||
var faces = this.faces;
|
||||
|
||||
var hitAreaCallback = function (area, x, y)
|
||||
{
|
||||
for (var i = 0; i < faces.length; i++)
|
||||
{
|
||||
var face = faces[i];
|
||||
|
||||
// Don't pass a calcMatrix, as the x/y are already transformed
|
||||
if (face.contains(x, y))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
this.scene.sys.input.enable(this, hitAreaCallback);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets an additive tint on all vertices of this Mesh Game Object.
|
||||
*
|
||||
|
@ -59602,6 +59664,8 @@ var NineSlice = new Class({
|
|||
|
||||
this.setSlices(width, height, leftWidth, rightWidth, topHeight, bottomHeight);
|
||||
|
||||
this.setOrigin(0.5, 0.5);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline();
|
||||
},
|
||||
|
@ -68081,10 +68145,6 @@ var UUID = __webpack_require__(76583);
|
|||
* The Plane Game Object also has the Animation component, allowing you to play animations
|
||||
* across the Plane just as you would with a Sprite.
|
||||
*
|
||||
* While a Plane cannot be enabled for input it does have the methods `hasFaceAt` and
|
||||
* `getFaceAt` which can be used with Pointer coordinates to detect if they have clicked
|
||||
* on Plane face, or not.
|
||||
*
|
||||
* Note that the Plane object is WebGL only and does not have a Canvas counterpart.
|
||||
*
|
||||
* The Plane origin is always 0.5 x 0.5 and cannot be changed.
|
||||
|
@ -146897,8 +146957,6 @@ var World = new Class({
|
|||
var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle);
|
||||
var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle);
|
||||
|
||||
console.log('overlap', overlap, 'xy', overlapX, overlapY);
|
||||
|
||||
var results = { overlap: overlap, result: false, x: overlapX, y: overlapY };
|
||||
|
||||
// We know the AABBs already intersect before we enter this method
|
||||
|
@ -146942,15 +147000,11 @@ var World = new Class({
|
|||
p *= 2;
|
||||
}
|
||||
|
||||
console.log('circ vel', body1Velocity, body2Velocity, 'p', p, 'nxy', nx, ny);
|
||||
|
||||
if (!body1Immovable)
|
||||
{
|
||||
body1Velocity.x = (body1Velocity.x - p / body1.mass * nx);
|
||||
body1Velocity.y = (body1Velocity.y - p / body1.mass * ny);
|
||||
body1Velocity.multiply(body1.bounce);
|
||||
|
||||
console.log('body1', body1Velocity, 'y', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -146958,8 +147012,6 @@ var World = new Class({
|
|||
body2Velocity.x = (body2Velocity.x + p / body2.mass * nx);
|
||||
body2Velocity.y = (body2Velocity.y + p / body2.mass * ny);
|
||||
body2Velocity.multiply(body2.bounce);
|
||||
|
||||
console.log('body2', body2Velocity, 'y', body2.y);
|
||||
}
|
||||
|
||||
if (!body1Immovable && !body2Immovable)
|
||||
|
@ -146974,8 +147026,6 @@ var World = new Class({
|
|||
body1.y -= overlapY;
|
||||
|
||||
body1.updateCenter();
|
||||
|
||||
console.log('body1 sep', body1.y);
|
||||
}
|
||||
|
||||
if (!body2Immovable)
|
||||
|
@ -153611,6 +153661,15 @@ var MatterTileBody = new Class({
|
|||
{
|
||||
this.setBody(body, addToWorld);
|
||||
}
|
||||
|
||||
if (tile.flipX || tile.flipY)
|
||||
{
|
||||
var rotationPoint = { x: tile.getCenterX(), y: tile.getCenterY() };
|
||||
var scaleX = (tile.flipX) ? -1 : 1;
|
||||
var scaleY = (tile.flipY) ? -1 : 1;
|
||||
|
||||
Body.scale(body, scaleX, scaleY, rotationPoint);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -180591,7 +180650,7 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* This array is intentionally sparse. Do not adjust.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#glow
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.FXPipeline#fxHandlers
|
||||
* @type {function[]}
|
||||
* @since 3.60.0
|
||||
*/
|
||||
|
@ -180693,7 +180752,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGlow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Glow} config - The Glow FX controller.
|
||||
* @param {Phaser.FX.Glow} config - The Glow FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180714,7 +180773,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShadow
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shadow} config - The Shadow FX controller.
|
||||
* @param {Phaser.FX.Shadow} config - The Shadow FX controller.
|
||||
*/
|
||||
onShadow: function (config)
|
||||
{
|
||||
|
@ -180733,7 +180792,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onPixelate
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {Phaser.FX.Pixelate} config - The Pixelate FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180754,7 +180813,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onVignette
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Vignette} config - The Vignette FX controller.
|
||||
* @param {Phaser.FX.Vignette} config - The Vignette FX controller.
|
||||
*/
|
||||
onVignette: function (config)
|
||||
{
|
||||
|
@ -180773,7 +180832,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onShine
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Shine} config - The Shine FX controller.
|
||||
* @param {Phaser.FX.Shine} config - The Shine FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180794,7 +180853,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBlur
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Blur} config - The Blur FX controller.
|
||||
* @param {Phaser.FX.Blur} config - The Blur FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180831,7 +180890,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onGradient
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Gradient} config - The Gradient FX controller.
|
||||
* @param {Phaser.FX.Gradient} config - The Gradient FX controller.
|
||||
*/
|
||||
onGradient: function (config)
|
||||
{
|
||||
|
@ -180850,7 +180909,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBloom
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bloom} config - The Bloom FX controller.
|
||||
* @param {Phaser.FX.Bloom} config - The Bloom FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180889,7 +180948,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onColorMatrix
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
* @param {Phaser.FX.ColorMatrix} config - The ColorMatrix FX controller.
|
||||
*/
|
||||
onColorMatrix: function (config)
|
||||
{
|
||||
|
@ -180907,7 +180966,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onCircle
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Circle} config - The Circle FX controller.
|
||||
* @param {Phaser.FX.Circle} config - The Circle FX controller.
|
||||
* @param {number} width - The width of the target.
|
||||
* @param {number} height - The height of the target.
|
||||
*/
|
||||
|
@ -180928,7 +180987,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBarrel
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Barrel} config - The Barrel FX controller.
|
||||
* @param {Phaser.FX.Barrel} config - The Barrel FX controller.
|
||||
*/
|
||||
onBarrel: function (config)
|
||||
{
|
||||
|
@ -180947,7 +181006,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onDisplacement
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Displacement} config - The Displacement FX controller.
|
||||
* @param {Phaser.FX.Displacement} config - The Displacement FX controller.
|
||||
*/
|
||||
onDisplacement: function (config)
|
||||
{
|
||||
|
@ -180967,7 +181026,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onWipe
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Wipe} config - The Wipe FX controller.
|
||||
* @param {Phaser.FX.Wipe} config - The Wipe FX controller.
|
||||
*/
|
||||
onWipe: function (config)
|
||||
{
|
||||
|
@ -180986,7 +181045,7 @@ var FXPipeline = new Class({
|
|||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#onBokeh
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller.Bokeh} config - The Bokeh FX controller.
|
||||
* @param {Phaser.FX.Bokeh} config - The Bokeh FX controller.
|
||||
*/
|
||||
onBokeh: function (config, width, height)
|
||||
{
|
||||
|
@ -181004,6 +181063,8 @@ var FXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.FXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -181024,6 +181085,8 @@ var FXPipeline = new Class({
|
|||
this.swap = null;
|
||||
|
||||
PreFXPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -183474,6 +183537,8 @@ var PostFXPipeline = new Class({
|
|||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.PostFXPipeline#destroy
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @return {this} This WebGLPipeline instance.
|
||||
*/
|
||||
destroy: function ()
|
||||
{
|
||||
|
@ -183488,6 +183553,8 @@ var PostFXPipeline = new Class({
|
|||
this.halfFrame2 = null;
|
||||
|
||||
WebGLPipeline.prototype.destroy.call(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -213686,7 +213753,14 @@ var ObjectHelper = new Class({
|
|||
|
||||
for (var key in properties)
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
if (sprite[key] !== undefined)
|
||||
{
|
||||
sprite[key] = properties[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.setData(key, properties[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -217536,6 +217610,7 @@ var Vector2 = __webpack_require__(93736);
|
|||
* @extends Phaser.GameObjects.Components.Mask
|
||||
* @extends Phaser.GameObjects.Components.Origin
|
||||
* @extends Phaser.GameObjects.Components.Pipeline
|
||||
* @extends Phaser.GameObjects.Components.PostPipeline
|
||||
* @extends Phaser.GameObjects.Components.ScrollFactor
|
||||
* @extends Phaser.GameObjects.Components.Transform
|
||||
* @extends Phaser.GameObjects.Components.Visible
|
||||
|
@ -217561,6 +217636,7 @@ var TilemapLayer = new Class({
|
|||
Components.Mask,
|
||||
Components.Origin,
|
||||
Components.Pipeline,
|
||||
Components.PostPipeline,
|
||||
Components.Transform,
|
||||
Components.Visible,
|
||||
Components.ScrollFactor,
|
||||
|
@ -217806,6 +217882,7 @@ var TilemapLayer = new Class({
|
|||
this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);
|
||||
|
||||
this.initPipeline();
|
||||
this.initPostPipeline(false);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -221471,16 +221548,21 @@ var HexagonalCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
@ -221792,103 +221874,101 @@ var IsometricCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
var mapData = layer.data;
|
||||
var mapWidth = layer.width;
|
||||
var mapHeight = layer.height;
|
||||
var skipCull = tilemapLayer.skipCull;
|
||||
|
||||
var drawLeft = 0;
|
||||
var drawRight = mapWidth;
|
||||
var drawTop = 0;
|
||||
var drawBottom = mapHeight;
|
||||
|
||||
if (!tilemapLayer.skipCull)
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
|
||||
if (renderOrder === 0)
|
||||
{
|
||||
var x;
|
||||
var y;
|
||||
var tile;
|
||||
// right-down
|
||||
|
||||
if (renderOrder === 0)
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// right-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
}
|
||||
else if (renderOrder === 1)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
{
|
||||
// left-down
|
||||
|
||||
for (y = drawTop; y < drawBottom; y++)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
}
|
||||
else if (renderOrder === 2)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// right-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawLeft; x < drawRight; x++)
|
||||
{
|
||||
for (x = drawLeft; mapData[y] && x < drawRight; x++)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
}
|
||||
else if (renderOrder === 3)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
{
|
||||
// left-up
|
||||
|
||||
for (y = drawBottom; y >= drawTop; y--)
|
||||
for (x = drawRight; x >= drawLeft; x--)
|
||||
{
|
||||
for (x = drawRight; mapData[y] && x >= drawLeft; x--)
|
||||
if (skipCull || CheckIsoBounds(x, y, layer, camera))
|
||||
{
|
||||
if (CheckIsoBounds(x, y, layer, camera))
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
tile = mapData[y][x];
|
||||
|
||||
if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
outputArray.push(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -223467,16 +223547,21 @@ var StaggeredCullTiles = function (layer, camera, outputArray, renderOrder)
|
|||
|
||||
var tilemapLayer = layer.tilemapLayer;
|
||||
|
||||
if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
if (tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)
|
||||
{
|
||||
// Camera world view bounds, snapped for scaled tile size
|
||||
// Cull Padding values are given in tiles, not pixels
|
||||
|
||||
var bounds = CullBounds(layer, camera);
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
bounds.left = 0;
|
||||
bounds.right = layer.width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = layer.height;
|
||||
}
|
||||
|
||||
RunCull(layer, bounds, renderOrder, outputArray);
|
||||
|
||||
return outputArray;
|
||||
};
|
||||
|
||||
|
|
2
dist/phaser.min.js
vendored
2
dist/phaser.min.js
vendored
File diff suppressed because one or more lines are too long
3352
types/phaser.d.ts
vendored
3352
types/phaser.d.ts
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue