Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060)

This commit is contained in:
photonstorm 2014-07-31 13:39:12 +01:00
parent 74b1189890
commit 9bbc8ecce3
4 changed files with 11 additions and 3 deletions

View file

@ -57,6 +57,7 @@ Version 2.1.0 - "Cairhien" - -in development-
* Remove escaping backslashes from RetroFont text set documentation (thanks @jackrugile #1051)
* Phaser.Loader was incorrectly getting the responseText from _xhr instead of _ajax on IE9 xDomainRequests (thanks @lardratboy #1050)
* Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060)
### Migration Guide

View file

@ -5,7 +5,9 @@
*/
/**
* A RenderTexture is a special texture that allows any displayObject to be rendered to it.
* A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and
* render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.
*
* @class Phaser.RenderTexture
* @constructor
* @param {Phaser.Game} game - Current game instance.

View file

@ -6,6 +6,10 @@
/**
* Phaser SpriteBatch constructor.
* The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles.
* It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over
* 1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled
* Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.
*
* @classdesc The SpriteBatch class is a really fast version of the DisplayObjectContainer built solely for speed, so use when you need a lot of sprites or particles.
* @class Phaser.SpriteBatch

View file

@ -950,7 +950,8 @@ Phaser.Physics.P2.Body.prototype = {
options = options || {};
if (!Array.isArray(points)) {
if (!Array.isArray(points))
{
points = Array.prototype.slice.call(arguments, 1);
}
@ -963,7 +964,7 @@ Phaser.Physics.P2.Body.prototype = {
}
else if (Array.isArray(points[0]))
{
path = points[0].slice(0);
path = points.slice();
}
else if (typeof points[0] === 'number')
{