Skip to content

Commit 9bbc8ec

Browse files
committed
Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu phaserjs#1060)
1 parent 74b1189 commit 9bbc8ec

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Version 2.1.0 - "Cairhien" - -in development-
5757

5858
* Remove escaping backslashes from RetroFont text set documentation (thanks @jackrugile #1051)
5959
* Phaser.Loader was incorrectly getting the responseText from _xhr instead of _ajax on IE9 xDomainRequests (thanks @lardratboy #1050)
60+
* Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060)
6061

6162

6263
### Migration Guide

src/gameobjects/RenderTexture.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
*/
66

77
/**
8-
* A RenderTexture is a special texture that allows any displayObject to be rendered to it.
8+
* A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and
9+
* 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.
10+
*
911
* @class Phaser.RenderTexture
1012
* @constructor
1113
* @param {Phaser.Game} game - Current game instance.

src/gameobjects/SpriteBatch.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
/**
88
* Phaser SpriteBatch constructor.
9+
* 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.
10+
* 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
11+
* 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
12+
* Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.
913
*
1014
* @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.
1115
* @class Phaser.SpriteBatch

src/physics/p2/Body.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,8 @@ Phaser.Physics.P2.Body.prototype = {
950950

951951
options = options || {};
952952

953-
if (!Array.isArray(points)) {
953+
if (!Array.isArray(points))
954+
{
954955
points = Array.prototype.slice.call(arguments, 1);
955956
}
956957

@@ -963,7 +964,7 @@ Phaser.Physics.P2.Body.prototype = {
963964
}
964965
else if (Array.isArray(points[0]))
965966
{
966-
path = points[0].slice(0);
967+
path = points.slice();
967968
}
968969
else if (typeof points[0] === 'number')
969970
{

0 commit comments

Comments
 (0)