mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-26 13:49:01 -05:00
change world.bounds to Infinity, remove world bounds check from Engine, closes #67
This commit is contained in:
parent
8555c0c671
commit
8b5192d04d
2 changed files with 2 additions and 7 deletions
|
@ -31,8 +31,8 @@ var World = {};
|
||||||
label: 'World',
|
label: 'World',
|
||||||
gravity: { x: 0, y: 1 },
|
gravity: { x: 0, y: 1 },
|
||||||
bounds: {
|
bounds: {
|
||||||
min: { x: 0, y: 0 },
|
min: { x: -Infinity, y: -Infinity },
|
||||||
max: { x: 800, y: 600 }
|
max: { x: Infinity, y: Infinity }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -312,11 +312,6 @@ var Engine = {};
|
||||||
if (body.isStatic || body.isSleeping)
|
if (body.isStatic || body.isSleeping)
|
||||||
continue;
|
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);
|
Body.update(body, deltaTime, timeScale, correction);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue