0
0
Fork 0
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:
liabru 2014-03-28 17:48:30 +00:00
parent f35a54d81f
commit 15acf3c9b8

View file

@ -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);