Skip to content

Commit 8b5192d

Browse files
committed
change world.bounds to Infinity, remove world bounds check from Engine, closes #67
1 parent 8555c0c commit 8b5192d

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/body/World.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ var World = {};
3131
label: 'World',
3232
gravity: { x: 0, y: 1 },
3333
bounds: {
34-
min: { x: 0, y: 0 },
35-
max: { x: 800, y: 600 }
34+
min: { x: -Infinity, y: -Infinity },
35+
max: { x: Infinity, y: Infinity }
3636
}
3737
};
3838

src/core/Engine.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,6 @@ var Engine = {};
312312
if (body.isStatic || body.isSleeping)
313313
continue;
314314

315-
// don't update out of world bodies
316-
if (body.bounds.max.x < worldBounds.min.x || body.bounds.min.x > worldBounds.max.x
317-
|| body.bounds.max.y < worldBounds.min.y || body.bounds.min.y > worldBounds.max.y)
318-
continue;
319-
320315
Body.update(body, deltaTime, timeScale, correction);
321316
}
322317
};

0 commit comments

Comments
 (0)