mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
Merge branch 'no-gravity-optim' of https://github.com/BlackDice/matter-js into BlackDice-no-gravity-optim
This commit is contained in:
commit
1b8574ac16
1 changed files with 3 additions and 0 deletions
|
@ -281,6 +281,9 @@ var Body = require('../body/Body');
|
||||||
* @param {vector} gravity
|
* @param {vector} gravity
|
||||||
*/
|
*/
|
||||||
var _bodiesApplyGravity = function(bodies, gravity) {
|
var _bodiesApplyGravity = function(bodies, gravity) {
|
||||||
|
if (gravity.x === 0 && gravity.y === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (var i = 0; i < bodies.length; i++) {
|
for (var i = 0; i < bodies.length; i++) {
|
||||||
var body = bodies[i];
|
var body = bodies[i];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue