Commit e7fc163e authored by wildfirecode's avatar wildfirecode

第一次提交

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
This diff is collapsed.
let fs = require('fs-extra');
let sloc = require('node-sloc');
let source = './build/phaser.js';
let sourceMap = './build/phaser.js.map';
let dest = '../phaser3-examples/public/build/dev.js';
let destMap = '../phaser3-examples/public/build/phaser.js.map';
if (fs.existsSync(dest))
{
fs.copy(sourceMap, destMap, function (err) {
if (err)
{
return console.error(err);
}
});
fs.copy(source, dest, function (err) {
if (err)
{
return console.error(err);
}
console.log('Build copied to ' + dest);
const options = {
path: './src',
extensions: [ '.js' ]
};
sloc(options).then((res) => {
console.log('Source files: ' + res.sloc.files + '\nLines of code: ' + res.sloc.sloc);
});
});
}
else
{
console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples');
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
The MIT License (MIT)
Copyright (c) 2018 Richard Davey, Photon Storm Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "phaser",
"version": "3.3.0",
"release": "Tetsuo",
"description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.",
"author": "Richard Davey <rich@photonstorm.com> (http://www.photonstorm.com)",
"logo": "https://raw.github.com/photonstorm/phaser/master/phaser-logo-small.png",
"homepage": "http://phaser.io",
"bugs": "https://github.com/photonstorm/phaser/issues",
"license": "MIT",
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
"main": "./src/phaser.js",
"repository": {
"type": "git",
"url": "https://photonstorm@github.com/photonstorm/phaser.git"
},
"scripts": {
"build": "webpack",
"watch": "webpack --watch",
"dist": "webpack --config webpack.dist.config.js",
"lint": "eslint --config .eslintrc.json \"src/**/*.js\"",
"lintfix": "eslint --config .eslintrc.json \"src/**/*.js\" --fix",
"sloc": "node-sloc \"./src\" --include-extensions \"js\""
},
"keywords": [
"2d",
"HTML5",
"WebGL",
"canvas",
"game",
"javascript",
"physics",
"tweens",
"typescript",
"web audio"
],
"devDependencies": {
"clean-webpack-plugin": "^0.1.19",
"eslint": "^4.19.0",
"fs-extra": "^5.0.0",
"node-sloc": "^0.1.10",
"raw-loader": "^0.5.1",
"uglifyjs-webpack-plugin": "^1.2.4",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.12",
"webpack-shell-plugin": "^0.5.0"
},
"dependencies": {
"eventemitter3": "^3.0.1"
}
}
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `angle` property,
* and then adds the given value to each of their `angle` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `Angle(group.getChildren(), value, step)`
*
* @function Phaser.Actions.Angle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `angle` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var Angle = function (items, value, step, index, direction)
{
return PropertyValueInc(items, 'angle', value, step, index, direction);
};
module.exports = Angle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @callback CallCallback
*
* @param {Phaser.GameObjects.GameObject} item - [description]
*/
/**
* Takes an array of objects and passes each of them to the given callback.
*
* @function Phaser.Actions.Call
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {CallCallback} callback - The callback to be invoked. It will be passed just one argument: the item from the array.
* @param {*} context - The scope in which the callback will be invoked.
*
* @return {array} The array of objects that was passed to this Action.
*/
var Call = function (items, callback, context)
{
for (var i = 0; i < items.length; i++)
{
var item = items[i];
callback.call(context, item);
}
return items;
};
module.exports = Call;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Takes an array of objects and returns the first element in the array that has properties which match
* all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`
* then it would return the first item which had the property `scaleX` set to 0.5 and `alpha` set to 1.
*
* To use this with a Group: `GetFirst(group.getChildren(), compare, index)`
*
* @function Phaser.Actions.GetFirst
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.
* @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
*
* @return {?(object|Phaser.GameObjects.GameObject)} The first object in the array that matches the comparison object, or `null` if no match was found.
*/
var GetFirst = function (items, compare, index)
{
if (index === undefined) { index = 0; }
for (var i = index; i < items.length; i++)
{
var item = items[i];
var match = true;
for (var property in compare)
{
if (item[property] !== compare[property])
{
match = false;
}
}
if (match)
{
return item;
}
}
return null;
};
module.exports = GetFirst;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Takes an array of objects and returns the last element in the array that has properties which match
* all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`
* then it would return the last item which had the property `scaleX` set to 0.5 and `alpha` set to 1.
*
* To use this with a Group: `GetLast(group.getChildren(), compare, index)`
*
* @function Phaser.Actions.GetLast
* @since 3.3.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.
* @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
*
* @return {?(object|Phaser.GameObjects.GameObject)} The last object in the array that matches the comparison object, or `null` if no match was found.
*/
var GetLast = function (items, compare, index)
{
if (index === undefined) { index = 0; }
for (var i = index; i < items.length; i++)
{
var item = items[i];
var match = true;
for (var property in compare)
{
if (item[property] !== compare[property])
{
match = false;
}
}
if (match)
{
return item;
}
}
return null;
};
module.exports = GetLast;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var AlignIn = require('../display/align/in/QuickSet');
var CONST = require('../display/align/const');
var GetFastValue = require('../utils/object/GetFastValue');
var NOOP = require('../utils/NOOP');
var Zone = require('../gameobjects/zone/Zone');
var tempZone = new Zone({ sys: { queueDepthSort: NOOP }}, 0, 0, 1, 1);
/**
* @typedef {object} GridAlignConfig
*
* @property {integer} [width=-1] - The width of the grid in items (not pixels). -1 means lay all items out horizontally, regardless of quantity.
* If both this value and height are set to -1 then this value overrides it and the `height` value is ignored.
* @property {integer} [height=-1] - The height of the grid in items (not pixels). -1 means lay all items out vertically, regardless of quantity.
* If both this value and `width` are set to -1 then `width` overrides it and this value is ignored.
* @property {boolean} [cellWidth=1] - The width of the cell, in pixels, in which the item is positioned.
* @property {integer} [cellHeight=1] - The height of the cell, in pixels, in which the item is positioned.
* @property {integer} [position=0] - The alignment position. One of the Phaser.Display.Align consts such as `TOP_LEFT` or `RIGHT_CENTER`.
* @property {number} [x=0] - Optionally place the top-left of the final grid at this coordinate.
* @property {number} [y=0] - Optionally place the top-left of the final grid at this coordinate.
*/
/**
* Takes an array of Game Objects, or any objects that have public `x` and `y` properties,
* and then aligns them based on the grid configuration given to this action.
*
* @function Phaser.Actions.GridAlign
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {GridAlignConfig} options - The GridAlign Configuration object.
*
* @return {array} The array of objects that were passed to this Action.
*/
var GridAlign = function (items, options)
{
if (options === undefined) { options = {}; }
var width = GetFastValue(options, 'width', -1);
var height = GetFastValue(options, 'height', -1);
var cellWidth = GetFastValue(options, 'cellWidth', 1);
var cellHeight = GetFastValue(options, 'cellHeight', cellWidth);
var position = GetFastValue(options, 'position', CONST.TOP_LEFT);
var x = GetFastValue(options, 'x', 0);
var y = GetFastValue(options, 'y', 0);
var cx = 0;
var cy = 0;
var w = (width * cellWidth);
var h = (height * cellHeight);
tempZone.setPosition(x, y);
tempZone.setSize(cellWidth, cellHeight);
for (var i = 0; i < items.length; i++)
{
AlignIn(items[i], tempZone, position);
if (width === -1)
{
// We keep laying them out horizontally until we've done them all
cy += cellHeight;
tempZone.y += cellHeight;
if (cy === h)
{
cy = 0;
tempZone.x += cellWidth;
tempZone.y = y;
}
}
else if (height === -1)
{
// We keep laying them out vertically until we've done them all
cx += cellWidth;
tempZone.x += cellWidth;
if (cx === w)
{
cx = 0;
tempZone.x = x;
tempZone.y += cellHeight;
}
}
else
{
// We keep laying them out until we hit the column limit
cx += cellWidth;
tempZone.x += cellWidth;
if (cx === w)
{
cx = 0;
cy += cellHeight;
tempZone.x = x;
tempZone.y += cellHeight;
if (cy === h)
{
// We've hit the column limit, so return, even if there are items left
break;
}
}
}
}
return items;
};
module.exports = GridAlign;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `alpha` property,
* and then adds the given value to each of their `alpha` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncAlpha(group.getChildren(), value, step)`
*
* @function Phaser.Actions.IncAlpha
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `alpha` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var IncAlpha = function (items, value, step, index, direction)
{
return PropertyValueInc(items, 'alpha', value, step, index, direction);
};
module.exports = IncAlpha;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `x` property,
* and then adds the given value to each of their `x` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.IncX
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `x` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var IncX = function (items, value, step, index, direction)
{
return PropertyValueInc(items, 'x', value, step, index, direction);
};
module.exports = IncX;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have public `x` and `y` properties,
* and then adds the given value to each of them.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncXY(group.getChildren(), x, y, stepX, stepY)`
*
* @function Phaser.Actions.IncXY
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} x - The amount to be added to the `x` property.
* @param {number} [y=x] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value.
* @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.
* @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var IncXY = function (items, x, y, stepX, stepY, index, direction)
{
if (y === undefined || y === null) { y = x; }
PropertyValueInc(items, 'x', x, stepX, index, direction);
return PropertyValueInc(items, 'y', y, stepY, index, direction);
};
module.exports = IncXY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `y` property,
* and then adds the given value to each of their `y` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `IncY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.IncY
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `y` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var IncY = function (items, value, step, index, direction)
{
return PropertyValueInc(items, 'y', value, step, index, direction);
};
module.exports = IncY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Actions.PlaceOnCircle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Circle} circle - [description]
* @param {number} [startAngle=0] - [description]
* @param {number} [endAngle=6.28] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var PlaceOnCircle = function (items, circle, startAngle, endAngle)
{
if (startAngle === undefined) { startAngle = 0; }
if (endAngle === undefined) { endAngle = 6.28; }
var angle = startAngle;
var angleStep = (endAngle - startAngle) / items.length;
for (var i = 0; i < items.length; i++)
{
items[i].x = circle.x + (circle.radius * Math.cos(angle));
items[i].y = circle.y + (circle.radius * Math.sin(angle));
angle += angleStep;
}
return items;
};
module.exports = PlaceOnCircle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Actions.PlaceOnEllipse
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Ellipse} ellipse - [description]
* @param {number} [startAngle=0] - [description]
* @param {number} [endAngle=6.28] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var PlaceOnEllipse = function (items, ellipse, startAngle, endAngle)
{
if (startAngle === undefined) { startAngle = 0; }
if (endAngle === undefined) { endAngle = 6.28; }
var angle = startAngle;
var angleStep = (endAngle - startAngle) / items.length;
var a = ellipse.width / 2;
var b = ellipse.height / 2;
for (var i = 0; i < items.length; i++)
{
items[i].x = ellipse.x + a * Math.cos(angle);
items[i].y = ellipse.y + b * Math.sin(angle);
angle += angleStep;
}
return items;
};
module.exports = PlaceOnEllipse;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var GetPoints = require('../geom/line/GetPoints');
/**
* [description]
*
* @function Phaser.Actions.PlaceOnLine
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Line} line - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var PlaceOnLine = function (items, line)
{
var points = GetPoints(line, items.length);
for (var i = 0; i < items.length; i++)
{
var item = items[i];
var point = points[i];
item.x = point.x;
item.y = point.y;
}
return items;
};
module.exports = PlaceOnLine;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var MarchingAnts = require('../geom/rectangle/MarchingAnts');
var RotateLeft = require('../utils/array/RotateLeft');
var RotateRight = require('../utils/array/RotateRight');
// Place the items in the array around the perimeter of the given rectangle.
// Placement starts from the top-left of the rectangle, and proceeds in a
// clockwise direction. If the shift parameter is given you can offset where
// placement begins.
/**
* [description]
*
* @function Phaser.Actions.PlaceOnRectangle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - [description]
* @param {integer} [shift=1] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var PlaceOnRectangle = function (items, rect, shift)
{
if (shift === undefined) { shift = 0; }
var points = MarchingAnts(rect, false, items.length);
if (shift > 0)
{
RotateLeft(points, shift);
}
else if (shift < 0)
{
RotateRight(points, Math.abs(shift));
}
for (var i = 0; i < items.length; i++)
{
items[i].x = points[i].x;
items[i].y = points[i].y;
}
return items;
};
module.exports = PlaceOnRectangle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
// var GetPointsOnLine = require('../geom/line/GetPointsOnLine');
var BresenhamPoints = require('../geom/line/BresenhamPoints');
/**
* [description]
*
* @function Phaser.Actions.PlaceOnTriangle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Triangle} triangle - [description]
* @param {number} [stepRate=1] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var PlaceOnTriangle = function (items, triangle, stepRate)
{
var p1 = BresenhamPoints({ x1: triangle.x1, y1: triangle.y1, x2: triangle.x2, y2: triangle.y2 }, stepRate);
var p2 = BresenhamPoints({ x1: triangle.x2, y1: triangle.y2, x2: triangle.x3, y2: triangle.y3 }, stepRate);
var p3 = BresenhamPoints({ x1: triangle.x3, y1: triangle.y3, x2: triangle.x1, y2: triangle.y1 }, stepRate);
// Remove overlaps
p1.pop();
p2.pop();
p3.pop();
p1 = p1.concat(p2, p3);
var step = p1.length / items.length;
var p = 0;
for (var i = 0; i < items.length; i++)
{
var item = items[i];
var point = p1[Math.floor(p)];
item.x = point.x;
item.y = point.y;
p += step;
}
return items;
};
module.exports = PlaceOnTriangle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Actions.PlayAnimation
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} key - [description]
* @param {(string|integer)} [startFrame] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var PlayAnimation = function (items, key, startFrame)
{
for (var i = 0; i < items.length; i++)
{
items[i].anims.play(key, startFrame);
}
return items;
};
module.exports = PlayAnimation;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Takes an array of Game Objects, or any objects that have a public property as defined in `key`,
* and then adds the given value to it.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `PropertyValueInc(group.getChildren(), key, value, step)`
*
* @function Phaser.Actions.PropertyValueInc
* @since 3.3.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {string} key - The property to be updated.
* @param {number} value - The amount to be added to the property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var PropertyValueInc = function (items, key, value, step, index, direction)
{
if (step === undefined) { step = 0; }
if (index === undefined) { index = 0; }
if (direction === undefined) { direction = 1; }
var i;
var t = 0;
var end = items.length;
if (direction === 1)
{
// Start to End
for (i = index; i < end; i++)
{
items[i][key] += value + (t * step);
t++;
}
}
else
{
// End to Start
for (i = index; i >= 0; i--)
{
items[i][key] += value + (t * step);
t++;
}
}
return items;
};
module.exports = PropertyValueInc;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Takes an array of Game Objects, or any objects that have a public property as defined in `key`,
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `PropertyValueSet(group.getChildren(), key, value, step)`
*
* @function Phaser.Actions.PropertyValueSet
* @since 3.3.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {string} key - The property to be updated.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var PropertyValueSet = function (items, key, value, step, index, direction)
{
if (step === undefined) { step = 0; }
if (index === undefined) { index = 0; }
if (direction === undefined) { direction = 1; }
var i;
var t = 0;
var end = items.length;
if (direction === 1)
{
// Start to End
for (i = index; i < end; i++)
{
items[i][key] = value + (t * step);
t++;
}
}
else
{
// End to Start
for (i = index; i >= 0; i--)
{
items[i][key] = value + (t * step);
t++;
}
}
return items;
};
module.exports = PropertyValueSet;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Random = require('../geom/circle/Random');
/**
* [description]
*
* @function Phaser.Actions.RandomCircle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Circle} circle - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var RandomCircle = function (items, circle)
{
for (var i = 0; i < items.length; i++)
{
Random(circle, items[i]);
}
return items;
};
module.exports = RandomCircle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Random = require('../geom/ellipse/Random');
/**
* [description]
*
* @function Phaser.Actions.RandomEllipse
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Ellipse} ellipse - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var RandomEllipse = function (items, ellipse)
{
for (var i = 0; i < items.length; i++)
{
Random(ellipse, items[i]);
}
return items;
};
module.exports = RandomEllipse;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Random = require('../geom/line/Random');
/**
* [description]
*
* @function Phaser.Actions.RandomLine
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Line} line - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var RandomLine = function (items, line)
{
for (var i = 0; i < items.length; i++)
{
Random(line, items[i]);
}
return items;
};
module.exports = RandomLine;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Random = require('../geom/rectangle/Random');
/**
* [description]
*
* @function Phaser.Actions.RandomRectangle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var RandomRectangle = function (items, rect)
{
for (var i = 0; i < items.length; i++)
{
Random(rect, items[i]);
}
return items;
};
module.exports = RandomRectangle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Random = require('../geom/triangle/Random');
/**
* [description]
*
* @function Phaser.Actions.RandomTriangle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Triangle} triangle - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var RandomTriangle = function (items, triangle)
{
for (var i = 0; i < items.length; i++)
{
Random(triangle, items[i]);
}
return items;
};
module.exports = RandomTriangle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `rotation` property,
* and then adds the given value to each of their `rotation` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `Rotate(group.getChildren(), value, step)`
*
* @function Phaser.Actions.Rotate
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `rotation` property (in radians).
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var Rotate = function (items, value, step, index, direction)
{
return PropertyValueInc(items, 'rotation', value, step, index, direction);
};
module.exports = Rotate;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var RotateAroundDistance = require('../math/RotateAroundDistance');
var DistanceBetween = require('../math/distance/DistanceBetween');
/**
* [description]
*
* @function Phaser.Actions.RotateAround
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {object} point - Any object with public `x` and `y` properties.
* @param {number} angle - The angle to rotate by, in radians.
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var RotateAround = function (items, point, angle)
{
var x = point.x;
var y = point.y;
for (var i = 0; i < items.length; i++)
{
var item = items[i];
RotateAroundDistance(item, x, y, angle, Math.max(1, DistanceBetween(item.x, item.y, x, y)));
}
return items;
};
module.exports = RotateAround;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var MathRotateAroundDistance = require('../math/RotateAroundDistance');
/**
* [description]
*
* @function Phaser.Actions.RotateAroundDistance
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {object} point - Any object with public `x` and `y` properties.
* @param {number} angle - The angle to rotate by, in radians.
* @param {number} distance - The distance from the point of rotation in pixels.
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var RotateAroundDistance = function (items, point, angle, distance)
{
var x = point.x;
var y = point.y;
// There's nothing to do
if (distance === 0)
{
return items;
}
for (var i = 0; i < items.length; i++)
{
MathRotateAroundDistance(items[i], x, y, angle, distance);
}
return items;
};
module.exports = RotateAroundDistance;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `scaleX` property,
* and then adds the given value to each of their `scaleX` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `ScaleX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.ScaleX
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `scaleX` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var ScaleX = function (items, value, step, index, direction)
{
return PropertyValueInc(items, 'scaleX', value, step, index, direction);
};
module.exports = ScaleX;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties,
* and then adds the given value to each of them.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `ScaleXY(group.getChildren(), scaleX, scaleY, stepX, stepY)`
*
* @function Phaser.Actions.ScaleXY
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} scaleX - The amount to be added to the `scaleX` property.
* @param {number} [scaleY] - The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value.
* @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.
* @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var ScaleXY = function (items, scaleX, scaleY, stepX, stepY, index, direction)
{
if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }
PropertyValueInc(items, 'scaleX', scaleX, stepX, index, direction);
return PropertyValueInc(items, 'scaleY', scaleY, stepY, index, direction);
};
module.exports = ScaleXY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `scaleY` property,
* and then adds the given value to each of their `scaleY` properties.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `ScaleY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.ScaleY
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `scaleY` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var ScaleY = function (items, value, step, index, direction)
{
return PropertyValueInc(items, 'scaleY', value, step, index, direction);
};
module.exports = ScaleY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `alpha`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetAlpha(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetAlpha
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetAlpha = function (items, value, step, index, direction)
{
return PropertyValueSet(items, 'alpha', value, step, index, direction);
};
module.exports = SetAlpha;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `blendMode`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetBlendMode(group.getChildren(), value)`
*
* @function Phaser.Actions.SetBlendMode
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetBlendMode = function (items, value, index, direction)
{
return PropertyValueSet(items, 'blendMode', value, 0, index, direction);
};
module.exports = SetBlendMode;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `depth`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetDepth(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetDepth
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetDepth = function (items, value, step, index, direction)
{
return PropertyValueSet(items, 'depth', value, step, index, direction);
};
module.exports = SetDepth;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Actions.SetHitArea
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {*} hitArea - [description]
* @param {HitAreaCallback} hitAreaCallback - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var SetHitArea = function (items, hitArea, hitAreaCallback)
{
for (var i = 0; i < items.length; i++)
{
items[i].setInteractive(hitArea, hitAreaCallback);
}
return items;
};
module.exports = SetHitArea;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public properties `originX` and `originY`
* and then sets them to the given values.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetOrigin(group.getChildren(), originX, originY, stepX, stepY)`
*
* @function Phaser.Actions.SetOrigin
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} originX - The amount to set the `originX` property to.
* @param {number} [originY] - The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value.
* @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter.
* @param {number} [stepY=0] - This is added to the `originY` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetOrigin = function (items, originX, originY, stepX, stepY, index, direction)
{
if (originY === undefined || originY === null) { originY = originX; }
PropertyValueSet(items, 'originX', originX, stepX, index, direction);
return PropertyValueSet(items, 'originY', originY, stepY, index, direction);
};
module.exports = SetOrigin;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `rotation`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetRotation(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetRotation
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetRotation = function (items, value, step, index, direction)
{
return PropertyValueSet(items, 'rotation', value, step, index, direction);
};
module.exports = SetRotation;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public properties `scaleX` and `scaleY`
* and then sets them to the given values.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetScale(group.getChildren(), scaleX, scaleY, stepX, stepY)`
*
* @function Phaser.Actions.SetScale
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} scaleX - The amount to set the `scaleX` property to.
* @param {number} [scaleY] - The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value.
* @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.
* @param {number} [stepY=0] - This is added to the `scaleY` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetScale = function (items, scaleX, scaleY, stepX, stepY, index, direction)
{
if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }
PropertyValueSet(items, 'scaleX', scaleX, stepX, index, direction);
return PropertyValueSet(items, 'scaleY', scaleY, stepY, index, direction);
};
module.exports = SetScale;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `scaleX`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetScaleX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetScaleX
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetScaleX = function (items, value, step, index, direction)
{
return PropertyValueSet(items, 'scaleX', value, step, index, direction);
};
module.exports = SetScaleX;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `scaleY`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetScaleY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetScaleY
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetScaleY = function (items, value, step, index, direction)
{
return PropertyValueSet(items, 'scaleY', value, step, index, direction);
};
module.exports = SetScaleY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Actions.SetTint
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {number} topLeft - [description]
* @param {number} [topRight] - [description]
* @param {number} [bottomLeft] - [description]
* @param {number} [bottomRight] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var SetTint = function (items, topLeft, topRight, bottomLeft, bottomRight)
{
for (var i = 0; i < items.length; i++)
{
items[i].setTint(topLeft, topRight, bottomLeft, bottomRight);
}
return items;
};
module.exports = SetTint;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `visible`
* and then sets it to the given value.
*
* To use this with a Group: `SetVisible(group.getChildren(), value)`
*
* @function Phaser.Actions.SetVisible
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {boolean} value - The value to set the property to.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetVisible = function (items, value, index, direction)
{
return PropertyValueSet(items, 'visible', value, 0, index, direction);
};
module.exports = SetVisible;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `x`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetX
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetX = function (items, value, step, index, direction)
{
return PropertyValueSet(items, 'x', value, step, index, direction);
};
module.exports = SetX;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public properties `x` and `y`
* and then sets them to the given values.
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetXY(group.getChildren(), x, y, stepX, stepY)`
*
* @function Phaser.Actions.SetXY
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} x - The amount to set the `x` property to.
* @param {number} [y=x] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value.
* @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.
* @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetXY = function (items, x, y, stepX, stepY, index, direction)
{
if (y === undefined || y === null) { y = x; }
PropertyValueSet(items, 'x', x, stepX, index, direction);
return PropertyValueSet(items, 'y', y, stepY, index, direction);
};
module.exports = SetXY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `y`
* and then sets it to the given value.
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
* To use this with a Group: `SetY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetY
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
*
* @return {array} The array of objects that were passed to this Action.
*/
var SetY = function (items, value, step, index, direction)
{
return PropertyValueSet(items, 'y', value, step, index, direction);
};
module.exports = SetY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Vector2 = require('../math/Vector2');
/**
* Iterate through items changing the position of each element to
* be that of the element that came before it in the array (or after it if direction = 1)
* The first items position is set to x/y.
* The final x/y coords are returned
*
* @function Phaser.Actions.ShiftPosition
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {number} x - [description]
* @param {number} y - [description]
* @param {integer} [direction=0] - [description]
* @param {(Phaser.Math.Vector2|object)} [output] - [description]
*
* @return {Phaser.Math.Vector2} The output vector.
*/
var ShiftPosition = function (items, x, y, direction, output)
{
if (direction === undefined) { direction = 0; }
if (output === undefined) { output = new Vector2(); }
var px;
var py;
if (items.length > 1)
{
var i;
var cx;
var cy;
var cur;
if (direction === 0)
{
// Bottom to Top
var len = items.length - 1;
px = items[len].x;
py = items[len].y;
for (i = len - 1; i >= 0; i--)
{
// Current item
cur = items[i];
// Get current item x/y, to be passed to the next item in the list
cx = cur.x;
cy = cur.y;
// Set current item to the previous items x/y
cur.x = px;
cur.y = py;
// Set current as previous
px = cx;
py = cy;
}
// Update the head item to the new x/y coordinates
items[len].x = x;
items[len].y = y;
}
else
{
// Top to Bottom
px = items[0].x;
py = items[0].y;
for (i = 1; i < items.length; i++)
{
// Current item
cur = items[i];
// Get current item x/y, to be passed to the next item in the list
cx = cur.x;
cy = cur.y;
// Set current item to the previous items x/y
cur.x = px;
cur.y = py;
// Set current as previous
px = cx;
py = cy;
}
// Update the head item to the new x/y coordinates
items[0].x = x;
items[0].y = y;
}
}
else
{
px = items[0].x;
py = items[0].y;
items[0].x = x;
items[0].y = y;
}
// Return the final set of coordinates as they're effectively lost from the shift and may be needed
output.x = px;
output.y = py;
return output;
};
module.exports = ShiftPosition;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var ArrayShuffle = require('../utils/array/Shuffle');
/**
* [description]
*
* @function Phaser.Actions.Shuffle
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var Shuffle = function (items)
{
return ArrayShuffle(items);
};
module.exports = Shuffle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var MathSmoothStep = require('../math/SmoothStep');
/**
* [description]
*
* @function Phaser.Actions.SmoothStep
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description]
* @param {number} min - [description]
* @param {number} max - [description]
* @param {number} inc - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var SmoothStep = function (items, property, min, max, inc)
{
if (inc === undefined) { inc = false; }
var step = Math.abs(max - min) / items.length;
var i;
if (inc)
{
for (i = 0; i < items.length; i++)
{
items[i][property] += MathSmoothStep(i * step, min, max);
}
}
else
{
for (i = 0; i < items.length; i++)
{
items[i][property] = MathSmoothStep(i * step, min, max);
}
}
return items;
};
module.exports = SmoothStep;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var MathSmootherStep = require('../math/SmootherStep');
/**
* [description]
*
* @function Phaser.Actions.SmootherStep
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description]
* @param {number} min - [description]
* @param {number} max - [description]
* @param {number} inc - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var SmootherStep = function (items, property, min, max, inc)
{
if (inc === undefined) { inc = false; }
var step = Math.abs(max - min) / items.length;
var i;
if (inc)
{
for (i = 0; i < items.length; i++)
{
items[i][property] += MathSmootherStep(i * step, min, max);
}
}
else
{
for (i = 0; i < items.length; i++)
{
items[i][property] = MathSmootherStep(i * step, min, max);
}
}
return items;
};
module.exports = SmootherStep;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Actions.Spread
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description]
* @param {number} min - [description]
* @param {number} max - [description]
* @param {number} [inc=false] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var Spread = function (items, property, min, max, inc)
{
if (inc === undefined) { inc = false; }
var step = Math.abs(max - min) / items.length;
var i;
if (inc)
{
for (i = 0; i < items.length; i++)
{
items[i][property] += i * step;
}
}
else
{
for (i = 0; i < items.length; i++)
{
items[i][property] = i * step;
}
}
return items;
};
module.exports = Spread;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Actions.ToggleVisible
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var ToggleVisible = function (items)
{
for (var i = 0; i < items.length; i++)
{
items[i].visible = !items[i].visible;
}
return items;
};
module.exports = ToggleVisible;
/**
* @author Richard Davey <rich@photonstorm.com>
* @author samme <samme.npm@gmail.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Wrap = require('../math/Wrap');
/**
* Wrap each item's coordinates within a rectangle's area.
*
* @function Phaser.Actions.WrapInRectangle
* @since 3.0.0
* @see Phaser.Math.Wrap
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - The rectangle.
* @param {number} [padding=0] - An amount added to each side of the rectangle during the operation.
*
* @return {array} The array of Game Objects that was passed to this Action.
*/
var WrapInRectangle = function (items, rect, padding)
{
if (padding === undefined)
{
padding = 0;
}
for (var i = 0; i < items.length; i++)
{
var item = items[i];
item.x = Wrap(item.x, rect.left - padding, rect.right + padding);
item.y = Wrap(item.y, rect.top - padding, rect.bottom + padding);
}
return items;
};
module.exports = WrapInRectangle;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @namespace Phaser.Actions
*/
module.exports = {
Angle: require('./Angle'),
Call: require('./Call'),
GetFirst: require('./GetFirst'),
GetLast: require('./GetLast'),
GridAlign: require('./GridAlign'),
IncAlpha: require('./IncAlpha'),
IncX: require('./IncX'),
IncXY: require('./IncXY'),
IncY: require('./IncY'),
PlaceOnCircle: require('./PlaceOnCircle'),
PlaceOnEllipse: require('./PlaceOnEllipse'),
PlaceOnLine: require('./PlaceOnLine'),
PlaceOnRectangle: require('./PlaceOnRectangle'),
PlaceOnTriangle: require('./PlaceOnTriangle'),
PlayAnimation: require('./PlayAnimation'),
PropertyValueInc: require('./PropertyValueInc'),
PropertyValueSet: require('./PropertyValueSet'),
RandomCircle: require('./RandomCircle'),
RandomEllipse: require('./RandomEllipse'),
RandomLine: require('./RandomLine'),
RandomRectangle: require('./RandomRectangle'),
RandomTriangle: require('./RandomTriangle'),
Rotate: require('./Rotate'),
RotateAround: require('./RotateAround'),
RotateAroundDistance: require('./RotateAroundDistance'),
ScaleX: require('./ScaleX'),
ScaleXY: require('./ScaleXY'),
ScaleY: require('./ScaleY'),
SetAlpha: require('./SetAlpha'),
SetBlendMode: require('./SetBlendMode'),
SetDepth: require('./SetDepth'),
SetHitArea: require('./SetHitArea'),
SetOrigin: require('./SetOrigin'),
SetRotation: require('./SetRotation'),
SetScale: require('./SetScale'),
SetScaleX: require('./SetScaleX'),
SetScaleY: require('./SetScaleY'),
SetTint: require('./SetTint'),
SetVisible: require('./SetVisible'),
SetX: require('./SetX'),
SetXY: require('./SetXY'),
SetY: require('./SetY'),
ShiftPosition: require('./ShiftPosition'),
Shuffle: require('./Shuffle'),
SmootherStep: require('./SmootherStep'),
SmoothStep: require('./SmoothStep'),
Spread: require('./Spread'),
ToggleVisible: require('./ToggleVisible'),
WrapInRectangle: require('./WrapInRectangle')
};
This diff is collapsed.
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Class = require('../utils/Class');
/**
* @typedef {object} JSONAnimationFrame
*
* @property {string} key - The key of the Texture this AnimationFrame uses.
* @property {(string|integer)} frame - The key of the Frame within the Texture that this AnimationFrame uses.
* @property {number} duration - Additional time (in ms) that this frame should appear for during playback.
*/
/**
* @classdesc
* A single frame in an Animation sequence.
*
* An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other
* frames in the animation, and index data. It also has the ability to fire its own `onUpdate` callback
* and modify the animation timing.
*
* AnimationFrames are generated automatically by the Animation class.
*
* @class AnimationFrame
* @memberOf Phaser.Animations
* @constructor
* @since 3.0.0
*
* @param {string} textureKey - The key of the Texture this AnimationFrame uses.
* @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.
* @param {integer} index - The index of this AnimationFrame within the Animation sequence.
* @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.
*/
var AnimationFrame = new Class({
initialize:
function AnimationFrame (textureKey, textureFrame, index, frame)
{
/**
* The key of the Texture this AnimationFrame uses.
*
* @name Phaser.Animations.AnimationFrame#textureKey
* @type {string}
* @since 3.0.0
*/
this.textureKey = textureKey;
/**
* The key of the Frame within the Texture that this AnimationFrame uses.
*
* @name Phaser.Animations.AnimationFrame#textureFrame
* @type {(string|integer)}
* @since 3.0.0
*/
this.textureFrame = textureFrame;
/**
* The index of this AnimationFrame within the Animation sequence.
*
* @name Phaser.Animations.AnimationFrame#index
* @type {integer}
* @since 3.0.0
*/
this.index = index;
/**
* A reference to the Texture Frame this AnimationFrame uses for rendering.
*
* @name Phaser.Animations.AnimationFrame#frame
* @type {Phaser.Textures.Frame}
* @since 3.0.0
*/
this.frame = frame;
/**
* Is this the first frame in an animation sequence?
*
* @name Phaser.Animations.AnimationFrame#isFirst
* @type {boolean}
* @default false
* @readOnly
* @since 3.0.0
*/
this.isFirst = false;
/**
* Is this the last frame in an animation sequence?
*
* @name Phaser.Animations.AnimationFrame#isLast
* @type {boolean}
* @default false
* @readOnly
* @since 3.0.0
*/
this.isLast = false;
/**
* A reference to the AnimationFrame that comes before this one in the animation, if any.
*
* @name Phaser.Animations.AnimationFrame#prevFrame
* @type {?Phaser.Animations.AnimationFrame}
* @default null
* @readOnly
* @since 3.0.0
*/
this.prevFrame = null;
/**
* A reference to the AnimationFrame that comes after this one in the animation, if any.
*
* @name Phaser.Animations.AnimationFrame#nextFrame
* @type {?Phaser.Animations.AnimationFrame}
* @default null
* @readOnly
* @since 3.0.0
*/
this.nextFrame = null;
/**
* Additional time (in ms) that this frame should appear for during playback.
* The value is added onto the msPerFrame set by the animation.
*
* @name Phaser.Animations.AnimationFrame#duration
* @type {number}
* @default 0
* @since 3.0.0
*/
this.duration = 0;
/**
* What % through the animation does this frame come?
* This value is generated when the animation is created and cached here.
*
* @name Phaser.Animations.AnimationFrame#progress
* @type {number}
* @default 0
* @readOnly
* @since 3.0.0
*/
this.progress = 0;
/**
* A frame specific callback, invoked if this frame gets displayed and the callback is set.
*
* @name Phaser.Animations.AnimationFrame#onUpdate
* @type {?function}
* @default null
* @since 3.0.0
*/
this.onUpdate = null;
},
/**
* Generates a JavaScript object suitable for converting to JSON.
*
* @method Phaser.Animations.AnimationFrame#toJSON
* @since 3.0.0
*
* @return {JSONAnimationFrame} The AnimationFrame data.
*/
toJSON: function ()
{
return {
key: this.textureKey,
frame: this.textureFrame,
duration: this.duration
};
},
/**
* Destroys this object by removing references to external resources and callbacks.
*
* @method Phaser.Animations.AnimationFrame#destroy
* @since 3.0.0
*/
destroy: function ()
{
this.frame = undefined;
this.onUpdate = undefined;
}
});
module.exports = AnimationFrame;
This diff is collapsed.
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @namespace Phaser.Animations
*/
module.exports = {
Animation: require('./Animation'),
AnimationFrame: require('./AnimationFrame'),
AnimationManager: require('./AnimationManager')
};
This diff is collapsed.
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var CanvasInterpolation = require('../display/canvas/CanvasInterpolation');
var CanvasPool = require('../display/canvas/CanvasPool');
var CONST = require('../const');
var Features = require('../device/Features');
/**
* Called automatically by Phaser.Game and responsible for creating the renderer it will use.
*
* Relies upon two webpack global flags to be defined: `WEBGL_RENDERER` and `CANVAS_RENDERER` during build time, but not at run-time.
*
* @function Phaser.Boot.CreateRenderer
* @since 3.0.0
*
* @param {Phaser.Game} game - The Phaser.Game instance on which the renderer will be set.
*/
var CreateRenderer = function (game)
{
var config = game.config;
// Game either requested Canvas,
// or requested AUTO or WEBGL but the browser doesn't support it, so fall back to Canvas
if (config.renderType !== CONST.HEADLESS)
{
if (config.renderType === CONST.CANVAS || (config.renderType !== CONST.CANVAS && !Features.webGL))
{
if (Features.canvas)
{
// They requested Canvas and their browser supports it
config.renderType = CONST.CANVAS;
}
else
{
throw new Error('Cannot create Canvas or WebGL context, aborting.');
}
}
else
{
// Game requested WebGL and browser says it supports it
config.renderType = CONST.WEBGL;
}
}
// Pixel Art mode?
if (config.pixelArt)
{
CanvasPool.disableSmoothing();
}
// Does the game config provide its own canvas element to use?
if (config.canvas)
{
game.canvas = config.canvas;
}
else
{
game.canvas = CanvasPool.create(game, config.width, config.height, config.renderType);
}
// Does the game config provide some canvas css styles to use?
if (config.canvasStyle)
{
game.canvas.style = config.canvasStyle;
}
// Pixel Art mode?
if (config.pixelArt)
{
CanvasInterpolation.setCrisp(game.canvas);
}
// Zoomed?
if (config.zoom !== 1)
{
game.canvas.style.width = (config.width * config.zoom).toString() + 'px';
game.canvas.style.height = (config.height * config.zoom).toString() + 'px';
}
if (config.renderType === CONST.HEADLESS)
{
// Nothing more to do here
return;
}
var CanvasRenderer;
var WebGLRenderer;
if (WEBGL_RENDERER && CANVAS_RENDERER)
{
CanvasRenderer = require('../renderer/canvas/CanvasRenderer');
WebGLRenderer = require('../renderer/webgl/WebGLRenderer');
// Let the config pick the renderer type, both are included
if (config.renderType === CONST.WEBGL)
{
game.renderer = new WebGLRenderer(game);
game.context = null;
}
else
{
game.renderer = new CanvasRenderer(game);
game.context = game.renderer.gameContext;
}
}
if (WEBGL_RENDERER && !CANVAS_RENDERER)
{
WebGLRenderer = require('../renderer/webgl/WebGLRenderer');
// Force the type to WebGL, regardless what was requested
config.renderType = CONST.WEBGL;
game.renderer = new WebGLRenderer(game);
game.context = null;
}
if (!WEBGL_RENDERER && CANVAS_RENDERER)
{
CanvasRenderer = require('../renderer/canvas/CanvasRenderer');
// Force the type to Canvas, regardless what was requested
config.renderType = CONST.CANVAS;
game.renderer = new CanvasRenderer(game);
game.context = game.renderer.gameContext;
}
};
module.exports = CreateRenderer;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @namespace Phaser.Boot
*/
module.exports = {
Config: require('./Config'),
CreateRenderer: require('./CreateRenderer'),
DebugHeader: require('./DebugHeader'),
PluginManager: require('./PluginManager'),
TimeStep: require('./TimeStep'),
VisibilityHandler: require('./VisibilityHandler')
};
This diff is collapsed.
This diff is collapsed.
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @namespace Phaser.Cache
*/
module.exports = {
BaseCache: require('./BaseCache'),
CacheManager: require('./CacheManager')
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment