mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
fixed Example.timescale
This commit is contained in:
parent
137580c3a0
commit
19656cd5d1
1 changed files with 3 additions and 3 deletions
|
@ -20,9 +20,9 @@
|
||||||
var body = bodies[i];
|
var body = bodies[i];
|
||||||
|
|
||||||
if (!body.isStatic && body.position.y >= 500) {
|
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]),
|
x: (forceMagnitude + Common.random() * forceMagnitude) * Common.choose([1, -1]),
|
||||||
y: -forceMagnitude + Common.random() * -forceMagnitude
|
y: -forceMagnitude + Common.random() * -forceMagnitude
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue