-
Notifications
You must be signed in to change notification settings - Fork 297
Home
Ben Moren edited this page Jun 5, 2021
·
3 revisions
THIS WIKI IS NOT FULLY COMPLETE YET! PLEASE USE THE README.MD IN THE MAIN REPOSITORY UNTIL IT IS COMPLETE!
p5.collide2D provides tools for calculating collision detection for 2D geometry with p5.js.
p5.collide2D contains some versions of, and references to, the functions in Jeffrey Thompson's Collision Detection Book. His code is CC BY-NC-SA 4.0, so, this is too! I highly, highly, reccomend reading his book to better understand all of the details involved in collision detection. Implementing this library into your code will be much easier and more efficent after reading it!
It's an incredible resource for this kind of work! – http://www.jeffreythompson.org/collision-detection/
- collidePointPoint()
- collidePointCircle()
- collidePointEllipse()
- collidePointRect()
- collidePointLine()
- collidePointArc()
- collideRectRect()
- collideCircleCircle()
- collideRectCircle()
- collideLineLine()
- collideLineCircle()
- collideLineRect()
- collidePointPoly()
- collideCirclePoly()
- collideRectPoly()
- collideLinePoly()
- collidePolyPoly()
- collidePointTriangle()
- collide 2D primitive triangle