2015-08-25 14:12:52 -04:00
|
|
|
(function() {
|
|
|
|
|
|
|
|
var World = Matter.World,
|
|
|
|
Composites = Matter.Composites;
|
|
|
|
|
|
|
|
Example.softBody = function(demo) {
|
|
|
|
var engine = demo.engine,
|
|
|
|
world = engine.world;
|
|
|
|
|
|
|
|
var particleOptions = {
|
|
|
|
friction: 0.05,
|
|
|
|
frictionStatic: 0.1,
|
|
|
|
render: { visible: true }
|
|
|
|
};
|
|
|
|
|
|
|
|
World.add(world, [
|
|
|
|
Composites.softBody(250, 100, 5, 5, 0, 0, true, 18, particleOptions),
|
2015-12-23 07:45:40 -05:00
|
|
|
Composites.softBody(400, 300, 8, 3, 0, 0, true, 15, particleOptions),
|
2015-08-25 14:12:52 -04:00
|
|
|
Composites.softBody(250, 400, 4, 4, 0, 0, true, 15, particleOptions)
|
|
|
|
]);
|
|
|
|
|
2016-04-24 18:54:38 -04:00
|
|
|
var renderOptions = demo.render.options;
|
2015-08-25 14:12:52 -04:00
|
|
|
renderOptions.showAngleIndicator = false;
|
|
|
|
};
|
|
|
|
|
2015-12-23 07:45:40 -05:00
|
|
|
})();
|