Skip to content

Commit

Permalink
updated demos & examples lists
Browse files Browse the repository at this point in the history
  • Loading branch information
schteppe committed Jul 9, 2014
1 parent bab058f commit 3e70d4a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ p2.js
* [Compound objects](http://schteppe.github.io/p2.js/demos/compound.html)
* [Concave objects](http://schteppe.github.io/p2.js/demos/concave.html)
* [Constraints](http://schteppe.github.io/p2.js/demos/constraints.html)
* [DistanceConstraint](http://schteppe.github.io/p2.js/demos/distanceConstraint.html)
* [Fixed rotation](http://schteppe.github.io/p2.js/demos/fixedRotation.html)
* [Friction](http://schteppe.github.io/p2.js/demos/friction.html)
* [Gear constraint](http://schteppe.github.io/p2.js/demos/gearConstraint.html)
* [Heightfield](http://schteppe.github.io/p2.js/demos/heightfield.html)
* [Island solver](http://schteppe.github.io/p2.js/demos/islandSolver.html)
* [Kinematic body](http://schteppe.github.io/p2.js/demos/kinematic.html)
* [Lock constraint](http://schteppe.github.io/p2.js/demos/lock.html)
* [Piston](http://schteppe.github.io/p2.js/demos/piston.html)
* [Prismatic constraint](http://schteppe.github.io/p2.js/demos/prismatic.html)
Expand All @@ -25,16 +27,21 @@ p2.js
* [Restitution](http://schteppe.github.io/p2.js/demos/restitution.html)
* [Sleep](http://schteppe.github.io/p2.js/demos/sleep.html)
* [Springs](http://schteppe.github.io/p2.js/demos/springs.html)
* [Tearable constraints](http://schteppe.github.io/p2.js/demos/tearable.html)
* [Surface velocity](http://schteppe.github.io/p2.js/demos/surfaceVelocity.html)
* [Suspension](http://schteppe.github.io/p2.js/demos/suspension.html)
* [Tearable constraints](http://schteppe.github.io/p2.js/demos/tearable.html)

### Examples
Examples showing how to use p2.js with your favorite renderer.

* [Canvas: Circle on plane](http://schteppe.github.io/p2.js/examples/canvas/circle.html)
* [Canvas: Box on plane](http://schteppe.github.io/p2.js/examples/canvas/box.html)
* [Canvas: Asteroids game](http://schteppe.github.io/p2.js/examples/canvas/asteroids.html)
* [Canvas: Box on plane](http://schteppe.github.io/p2.js/examples/canvas/box.html)
* [Canvas: Character demo](http://schteppe.github.io/p2.js/examples/canvas/character.html)
* [Canvas: Circle on plane](http://schteppe.github.io/p2.js/examples/canvas/circle.html)
* [Canvas: Interpolation](http://schteppe.github.io/p2.js/examples/pixijs/interpolation.html)
* [Canvas: Mousejoint](http://schteppe.github.io/p2.js/examples/pixijs/mouseJoint.html)
* [Canvas: Sensors](http://schteppe.github.io/p2.js/examples/pixijs/sensors.html)
* [Canvas: Sensors 2](http://schteppe.github.io/p2.js/examples/pixijs/sensors2.html)
* [Pixi.js: Box on plane](http://schteppe.github.io/p2.js/examples/pixijs/box.html)

### Sample code
Expand Down Expand Up @@ -78,11 +85,11 @@ setInterval(function(){

// The step method moves the bodies forward in time.
world.step(timeStep);

// Print the circle position to console.
// Could be replaced by a render call.
console.log("Circle y position: " + circleBody.position[1]);

}, 1000 * timeStep);
```

Expand Down
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,24 @@ <h1>Demos</h1>
<li><a href="demos/compound.html">Compound objects</a></li>
<li><a href="demos/concave.html">Concave objects</a></li>
<li><a href="demos/constraints.html">Constraints</a></li>
<li><a href="demos/distanceConstraint.html">DistanceConstraint</a></li>
<li><a href="demos/fixedRotation.html">Fixed rotation</a></li>
<li><a href="demos/friction.html">Friction</a></li>
<li><a href="demos/gearConstraint.html">Gear constraint</a></li>
<li><a href="demos/heightfield.html">Heightfield</a></li>
<li><a href="demos/islandSolver.html">Island solver</a></li>
<li><a href="demos/kinematic.html">Kinematic body</a></li>
<li><a href="demos/lock.html">Lock constraint</a></li>
<li><a href="demos/piston.html">Piston</a></li>
<li><a href="demos/prismatic.html">Prismatic constraint</a></li>
<li><a href="demos/ragdoll.html">Ragdoll</a></li>
<li><a href="demos/removeSensor.html">Sensor</a></li>
<li><a href="demos/restitution.html">Restitution</a></li>
<li><a href="demos/sleep.html">Sleep</a></li>
<li><a href="demos/springs.html">Springs</a></li>
<li><a href="demos/tearable.html">Tearable constraints</a></li>
<li><a href="demos/surfaceVelocity.html">Surface velocity</a></li>
<li><a href="demos/suspension.html">Suspension</a></li>
<li><a href="demos/tearable.html">Tearable constraints</a></li>
</ul>

<h1>Examples</h1>
Expand All @@ -51,7 +54,9 @@ <h1>Examples</h1>
<li><a href="examples/canvas/character.html">Canvas: Character/platform</a></li>
<li><a href="examples/canvas/circle.html">Canvas: Circle on plane</a></li>
<li><a href="examples/canvas/interpolation.html">Canvas: interpolation</a></li>
<li><a href="examples/canvas/mouseJoint.html">Canvas: mouse joint</a></li>
<li><a href="examples/canvas/sensors.html">Canvas: sensor</a></li>
<li><a href="examples/canvas/sensors2.html">Canvas: sensor 2</a></li>
<li><a href="examples/pixijs/box.html">Pixi.js: Box</a></li>
</ul>

Expand Down

0 comments on commit 3e70d4a

Please sign in to comment.