mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-27 09:50:52 -05:00
improved newtons cradle
This commit is contained in:
parent
f35a54d81f
commit
15acf3c9b8
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ var Composites = {};
|
|||
for (var i = 0; i < number; i++) {
|
||||
var separation = 1.9,
|
||||
circle = Bodies.circle(xx + i * (size * separation), yy + length, size,
|
||||
{ restitution: 1, friction: 0, frictionAir: 0.0001, slop: 0.01 }),
|
||||
{ inertia: 99999, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 0.01 }),
|
||||
constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle });
|
||||
|
||||
Composite.addBody(newtonsCradle, circle);
|
||||
|
|
Loading…
Reference in a new issue