Skip to content

Commit

Permalink
Merge branch 'no-gravity-optim' of https://github.com/BlackDice/matte…
Browse files Browse the repository at this point in the history
…r-js into BlackDice-no-gravity-optim
  • Loading branch information
liabru committed Dec 23, 2015
2 parents 8f2f8ee + e54802c commit 1b8574a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ var Body = require('../body/Body');
* @param {vector} gravity
*/
var _bodiesApplyGravity = function(bodies, gravity) {
if (gravity.x === 0 && gravity.y === 0) {
return;
}
for (var i = 0; i < bodies.length; i++) {
var body = bodies[i];

Expand Down

0 comments on commit 1b8574a

Please sign in to comment.