diff --git a/examples/cloth.js b/examples/cloth.js index 7586cf0..001fca7 100644 --- a/examples/cloth.js +++ b/examples/cloth.js @@ -34,7 +34,8 @@ Example.cloth = function() { // add bodies var group = Body.nextGroup(true), particleOptions = { friction: 0.00001, collisionFilter: { group: group }, render: { visible: false }}, - cloth = Composites.softBody(200, 200, 20, 12, 5, 5, false, 8, particleOptions); + constraintOptions = { stiffness: 0.06 }, + cloth = Composites.softBody(200, 200, 20, 12, 5, 5, false, 8, particleOptions, constraintOptions); for (var i = 0; i < 20; i++) { cloth.bodies[i].isStatic = true; diff --git a/src/factory/Composites.js b/src/factory/Composites.js index c6c75c7..7ef9f3f 100644 --- a/src/factory/Composites.js +++ b/src/factory/Composites.js @@ -317,7 +317,7 @@ var Bodies = require('./Bodies'); */ Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { particleOptions = Common.extend({ inertia: Infinity }, particleOptions); - constraintOptions = Common.extend({ stiffness: 0.4 }, constraintOptions); + constraintOptions = Common.extend({ stiffness: 0.2 }, constraintOptions); var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) { return Bodies.circle(x, y, particleRadius, particleOptions);