Skip to content

Commit f24b808

Browse files
committed
Added setGravity defaults and fixed nextGroup method.
1 parent ac9f5c4 commit f24b808

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

v3/src/physics/matter-js/World.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ var World = new Class({
211211

212212
setGravity: function (x, y, scale)
213213
{
214+
if (x === undefined) { x = 0; }
215+
if (y === undefined) { y = 1; }
216+
214217
this.localWorld.gravity.x = x;
215218
this.localWorld.gravity.y = y;
216219

@@ -248,7 +251,7 @@ var World = new Class({
248251

249252
nextGroup: function (isNonColliding)
250253
{
251-
return Body.nextGroup(isNonColliding);
254+
return MatterBody.nextGroup(isNonColliding);
252255
},
253256

254257
nextCategory: function ()

0 commit comments

Comments
 (0)