Skip to content

Commit

Permalink
update readme to include more useful info
Browse files Browse the repository at this point in the history
  • Loading branch information
ruby0x1 committed Apr 17, 2015
1 parent d55e6a9 commit fe09fe6
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,41 @@ A [Separating Axis Theorom](http://en.wikipedia.org/wiki/Hyperplane_separation_t

----

##View docs info and more
## Facts

- This is a port of Separating Axis Theorem, for collision detection between shapes.
- Supports polygons, circles, and rays currently.
- 2D only (for now).
- Includes a simple drawing interface for debugging shapes
- **COLLISION ONLY.** No physics here. By design :)
- Contributions welcome

##Quick look

**A simple collision example**

var circle = new Circle( 300, 200, 50 );
var box = Polygon.rectangle( 0, 0, 50, 150 );

box.rotation = 45;

var collideInfo = Collision.shapeWithShape( circle, box );

if(collideInfo != null) {
//use collideInfo.separation.x
// collideInfo.separation.y
// collideInfo.normalAxis.x
// collideInfo.normalAxis.y
// collideInfo.overlap
}

### Other notes

- **not** specific to [luxe](http://luxeengine.com/)
- See tests/ for usage examples and tests
- [Original code ported from rocketmandevelopment blog](http://rocketmandevelopment.com/2010/05/19/separation-of-axis-theorem-for-collision-detection/)

### API documentation

https://underscorediscovery.github.io/differ/

Expand All @@ -24,6 +58,12 @@ https://underscorediscovery.github.io/differ/
- [demo 2](http://underscorediscovery.com/sven/differ/usage2)
- [demo 3](http://underscorediscovery.com/sven/differ/usage3)

#Main Contributors

- [@underscorediscovery](http://github.com/underscorediscovery)
- [@Dvergar](http://github.com/Dvergar)
- [@PDeveloper](http://github.com/PDeveloper)

---

#History
Expand Down

0 comments on commit fe09fe6

Please sign in to comment.