P5.collide2D Versions Save

A collision detection library for 2D geometry in p5.js

0.7.3

3 years ago

fixes issue with collidePolyPoly() detecting only when p2 is inside p1, but not when p1 is inside p2. It now works both ways thanks to @tektsu !

0.7.1

3 years ago

The CDN's required a version number bump to properly sync so this will bring the releases up to the same number.

0.7

3 years ago

thank you to @wisehackermonkey for all of the work to add vector functions to the library!

Using this library with vectors

As of June 2020, this library now supports vector version of all functions. Simply use the function names below with Vector added onto the function name to utilize the vector version of the function. The function's arguments take in vectors instead of x/y values. Each of the examples below now has a commented example to demonstrate vector usage. We will be updating the documentation and examples in the future to make this distinction more clear. This in no way affects the original functionality of the library.

//Use vectors as input
let p1 	= createVector(100,100);
let mouse = createVector(mouseX,mouseY);
hit = collidePointPointVector(p1,mouse,10)

0.6

5 years ago

Thanks to @fidoaf for adding collidePointEllipse() !

I've added an auto generated min file. This is untested, if there are issues please report and divert to the un-minified version.

v0.5

6 years ago

Adds collidePointArc(), thank you to @davidgranstrom && @ognjenvucko

v0.4

7 years ago

Support for instantiated sketches & addition of minified version. thank you @conradoqg

v0.3

8 years ago

fixed point/point

v0.2

8 years ago

Initial alpha release of this library as p5.collide2D. Please report any issues to the issues tab.

0.1

8 years ago

2D functions only