From 19656cd5d1b696e09026ee45b5cddcf38eb6c189 Mon Sep 17 00:00:00 2001 From: liabru Date: Fri, 25 Dec 2015 15:00:23 +0000 Subject: [PATCH] fixed Example.timescale --- examples/timescale.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/timescale.js b/examples/timescale.js index e4ef94b..6bf8b21 100644 --- a/examples/timescale.js +++ b/examples/timescale.js @@ -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 }); @@ -88,4 +88,4 @@ })); }; -})(); \ No newline at end of file +})();