Skip to content

Commit 95d0b5f

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 4038291 + d554d61 commit 95d0b5f

9 files changed

Lines changed: 45 additions & 30 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#How to contribute
1+
# How to contribute
22

33
It's important to us that you feel you can contribute towards the evolution of Phaser. This can take many forms: from helping to fix bugs or improve the docs, to adding in new features to the source. This guide should help you in making that process as smooth as possible.
44

55
Before contributing, please read the [code of conduct](https://github.com/photonstorm/phaser/blob/master/v2/CODE_OF_CONDUCT.md).
66

7-
##Reporting issues
7+
## Reporting issues
88

99
[GitHub Issues][0] is the place to report bugs you may have found. When submitting a bug please do the following:
1010

@@ -19,12 +19,12 @@ Before contributing, please read the [code of conduct](https://github.com/photon
1919
**5. Share as much information as possible.** Include browser version affected, your OS, version of the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed.
2020

2121

22-
##Pixi and Phaser
22+
## Pixi and Phaser
2323

2424
It's important to understand that internally Phaser 2 uses a heavily customized version of [Pixi.js v2](https://github.com/GoodBoyDigital/pixi.js/) for all rendering. It's possible you may find a bug that is generated on the Pixi level rather than Phaser. You're welcome to still report the issue of course, but if you get a reply saying we think it might be a Pixi issue, this is what we're talking about :)
2525

2626

27-
##Support Forum
27+
## Support Forum
2828

2929
We have a very active [Phaser Support Forum][4]. If you need general support, or are struggling to understand how to do something or need your code checked over, then we would urge you to post it to our forum. There are a lot of friendly devs in there who can help, as well as the core Phaser and Pixi teams, so it's a great place to get support from. You're welcome to report bugs directly on GitHub, but for general support we'd always recommend using the forum first.
3030

@@ -47,17 +47,17 @@ make your changes and submit a Pull Request:
4747
- **Only commit relevant changes.** Don't include changes that are not directly relevant to the fix you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files changing only whitespace or trash files will likely get your PR closed.
4848

4949

50-
##Coding style preferences are not contributions
50+
## Coding style preferences are not contributions
5151

5252
If your PR is doing little more than changing the Phaser source code into a format / coding style that you prefer then we will automatically close it. All PRs must adhere to the coding style already set-out across the thousands of lines of code in Phaser. Your personal preferences for how things should "look" or be structured do not apply here, sorry. PRs should fix bugs, fix documentation or add features. No changes for the sake of change.
5353

5454

55-
##I don't really like git / node.js, but I can fix this bug
55+
## I don't really like git / node.js, but I can fix this bug
5656

5757
That is fine too. While Pull Requests are the best thing in the world for us, they are not the only way to help. You're welcome to post fixes to our forum or even just email them to us. All we ask is that you still adhere to the guidelines presented here re: JSHint, etc.
5858

5959

60-
##Code Style Guide
60+
## Code Style Guide
6161

6262
- Use 4 spaces for tabs, never tab characters.
6363

src/camera/3d/Camera3D.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ var Camera3D = new Class({
298298
dir.set(x, y, z);
299299
}
300300

301-
dir.sub(this.position).normalize();
301+
dir.subtract(this.position).normalize();
302302

303303
// Calculate right vector
304304
tmpVec3.copy(dir).cross(up).normalize();
@@ -319,7 +319,7 @@ var Camera3D = new Class({
319319

320320
rotateAround: function (point, radians, axis)
321321
{
322-
tmpVec3.copy(point).sub(this.position);
322+
tmpVec3.copy(point).subtract(this.position);
323323

324324
this.translate(tmpVec3);
325325
this.rotate(radians, axis);
@@ -391,7 +391,7 @@ var Camera3D = new Class({
391391

392392
direction.unproject(viewport, mtx);
393393

394-
direction.sub(origin).normalize();
394+
direction.subtract(origin).normalize();
395395

396396
return this.ray;
397397
},
@@ -419,7 +419,7 @@ var Camera3D = new Class({
419419
var dir = dirvec.set(this.direction).negate();
420420

421421
// Better view-aligned billboards might use this:
422-
// var dir = tmp.set(camera.position).sub(p).normalize();
422+
// var dir = tmp.set(camera.position).subtract(p).normalize();
423423

424424
var right = rightvec.set(this.up).cross(dir).normalize();
425425
var up = tmpVec3.set(dir).cross(right).normalize();

src/curves/curve/inc/GetTangent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var GetTangent = function (t, out)
3939
this.getPoint(t1, this._tmpVec2A);
4040
this.getPoint(t2, out);
4141

42-
return out.sub(this._tmpVec2A).normalize();
42+
return out.subtract(this._tmpVec2A).normalize();
4343
};
4444

4545
module.exports = GetTangent;

src/curves/line/LineCurve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var LineCurve = new Class({
5959
return out.copy(this.p1);
6060
}
6161

62-
out.copy(this.p1).sub(this.p0).scale(t).add(this.p0);
62+
out.copy(this.p1).subtract(this.p0).scale(t).add(this.p0);
6363

6464
return out;
6565
},
@@ -72,7 +72,7 @@ var LineCurve = new Class({
7272

7373
getTangent: function ()
7474
{
75-
var tangent = tmpVec2.copy(this.p1).sub(this.p0);
75+
var tangent = tmpVec2.copy(this.p1).subtract(this.p0);
7676

7777
return tangent.normalize();
7878
},

src/curves/path/inc/EllipseTo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var EllipseTo = function (xRadius, yRadius, startAngle, endAngle, clockwise, rot
2626
// Calculate where to center the ellipse
2727
var start = ellipse.getStartPoint(this._tmpVec2B);
2828

29-
end.sub(start);
29+
end.subtract(start);
3030

3131
ellipse.x = end.x;
3232
ellipse.y = end.y;

src/input/keyboard/combo/KeyComboMatchEvent.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ var KeyComboMatchEvent = new Class({
1111
{
1212
Event.call(this, 'KEY_COMBO_MATCH_EVENT');
1313

14-
this.target = keyCombo;
15-
16-
this.data = keyboardEvent;
14+
this.data = keyCombo;
1715
}
1816

1917
});

src/math/Quaternion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ var Quaternion = new Class({
168168

169169
if (dot < -0.999999)
170170
{
171-
if (tmpvec.copy(xUnitVec3).cross(a).len() < EPSILON)
171+
if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)
172172
{
173173
tmpvec.copy(yUnitVec3).cross(a);
174174
}
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
var CollideGroupVsTilemapLayer = function (group, tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)
22
{
3-
// TODO
3+
var children = group.getChildren();
44

5-
return false;
5+
if (children.length === 0)
6+
{
7+
return false;
8+
}
9+
10+
var didCollide = false;
11+
12+
for (var i = 0; i < children.length; i++)
13+
{
14+
if (children[i].body)
15+
{
16+
if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)) {
17+
didCollide = true;
18+
}
19+
}
20+
}
21+
22+
return didCollide;
623
};
724

825
module.exports = CollideGroupVsTilemapLayer;

src/physics/arcade/inc/CollideHandler.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,51 @@ var CollideHandler = function (object1, object2, collideCallback, processCallbac
99
// If neither of the objects are set then bail out
1010
if (!object1 || !object2)
1111
{
12-
return;
12+
return false;
1313
}
1414

1515
// A Body
1616
if (object1.body)
1717
{
1818
if (object2.body)
1919
{
20-
this.collideSpriteVsSprite(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
20+
return this.collideSpriteVsSprite(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
2121
}
2222
else if (object2.isParent)
2323
{
24-
this.collideSpriteVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
24+
return this.collideSpriteVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
2525
}
2626
else if (object2.isTilemap)
2727
{
28-
this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
28+
return this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
2929
}
3030
}
3131
// GROUPS
3232
else if (object1.isParent)
3333
{
3434
if (object2.body)
3535
{
36-
this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);
36+
return this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);
3737
}
3838
else if (object2.isParent)
3939
{
40-
this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
40+
return this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
4141
}
4242
else if (object2.isTilemap)
4343
{
44-
this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
44+
return this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);
4545
}
4646
}
4747
// TILEMAP LAYERS
4848
else if (object1.isTilemap)
4949
{
5050
if (object2.body)
5151
{
52-
this.collideSpriteVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);
52+
return this.collideSpriteVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);
5353
}
5454
else if (object2.isParent)
5555
{
56-
this.collideGroupVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);
56+
return this.collideGroupVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);
5757
}
5858
}
5959
};

0 commit comments

Comments
 (0)