0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

fixed Example.timescale

This commit is contained in:
liabru 2015-12-25 15:00:23 +00:00
parent 137580c3a0
commit 19656cd5d1

View file

@ -20,9 +20,9 @@
var body = bodies[i];
if (!body.isStatic && body.position.y >= 500) {
var forceMagnitude = 0.04 * body.mass;
var forceMagnitude = 0.05 * body.mass;
Body.applyForce(body, { x: 0, y: 0 }, {
Body.applyForce(body, body.position, {
x: (forceMagnitude + Common.random() * forceMagnitude) * Common.choose([1, -1]),
y: -forceMagnitude + Common.random() * -forceMagnitude
});