0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-25 13:39:06 -05:00

change world.bounds to Infinity, remove world bounds check from Engine, closes #67

This commit is contained in:
liabru 2015-05-20 23:29:35 +01:00
parent 8555c0c671
commit 8b5192d04d
2 changed files with 2 additions and 7 deletions

View file

@ -31,8 +31,8 @@ var World = {};
label: 'World',
gravity: { x: 0, y: 1 },
bounds: {
min: { x: 0, y: 0 },
max: { x: 800, y: 600 }
min: { x: -Infinity, y: -Infinity },
max: { x: Infinity, y: Infinity }
}
};

View file

@ -312,11 +312,6 @@ var Engine = {};
if (body.isStatic || body.isSleeping)
continue;
// don't update out of world bodies
if (body.bounds.max.x < worldBounds.min.x || body.bounds.min.x > worldBounds.max.x
|| body.bounds.max.y < worldBounds.min.y || body.bounds.min.y > worldBounds.max.y)
continue;
Body.update(body, deltaTime, timeScale, correction);
}
};