Skip to content

Commit

Permalink
change world.bounds to Infinity, remove world bounds check from Engine,
Browse files Browse the repository at this point in the history
closes #67
  • Loading branch information
liabru committed May 20, 2015
1 parent 8555c0c commit 8b5192d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/body/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
};

Expand Down
5 changes: 0 additions & 5 deletions src/core/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
Expand Down

0 comments on commit 8b5192d

Please sign in to comment.