Skip to content

Commit

Permalink
demo tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed May 3, 2015
1 parent c969767 commit 22445c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

// options
"laxbreak" : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"loopfunc" : true, // Allow functions in loops (e.g. for async closures)

// style
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
Expand Down
4 changes: 3 additions & 1 deletion demo/dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<!-- only required if using MatterTools -->
<link rel="stylesheet" href="./js/lib/matter-tools/matter-tools.css" type="text/css">
<script type="text/javascript" src="./js/lib/matter-tools/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="./js/lib/matter-tools/gif/gif.js"></script>
<script type="text/javascript" src="./js/lib/matter-tools/matter-tools-dev.js"></script>

<!-- matter demo code -->
Expand All @@ -34,8 +35,9 @@ <h1>Matter.js Demo (Dev. Build)</h1>
<select id="demo-select">
<option value="mixed">Mixed Shapes</option>
<option value="mixedSolid">Solid Rendering</option>
<option value="concave">Concave Bodies</option>
<option value="svg">Concave SVG Paths</option>
<option value="terrain">Concave Terrain</option>
<option value="concave">Concave Bodies</option>
<option value="compound">Compound Bodies</option>
<option value="newtonsCradle">Newton's Cradle</option>
<option value="wreckingBall">Wrecking Ball</option>
Expand Down
10 changes: 7 additions & 3 deletions demo/js/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,11 @@

Demo.reset();

var particleOptions = { render: { visible: true } };
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),
Expand Down Expand Up @@ -1422,8 +1426,8 @@
}
});

var vertices = Vertices.fromPath('164 171,232 233,213 302,273 241,342 305,316 231,364 170,309 188,281 117,240 182'),
concave = Bodies.fromVertices(200, 200, vertices);
var star = Vertices.fromPath('50 0 63 38 100 38 69 59 82 100 50 75 18 100 31 59 0 38 37 38'),
concave = Bodies.fromVertices(200, 200, star);

World.add(_world, [stack, concave]);

Expand Down

0 comments on commit 22445c7

Please sign in to comment.