detect-collisions
Version:
Polygons, Ellipses, Circles, Boxes, Lines, Points. Ray-Casting, offsets, rotation, scaling, padding, groups.
27 lines (16 loc) • 1.13 kB
Markdown
# detect-collisions
## Moved
* what was `detect-collisions` became `check2d`
* package moved here https://www.npmjs.com/package/check2d
* sorry for confusion, update your `package.json` with confidence
## Introduction
`check2d` is a lightning-fast ⚡️ TypeScript library built to detect collisions between diverse shapes like Points, Lines, Boxes, Polygons (including concave), Ellipses, and Circles. Utilizing Bounding Volume Hierarchy (BVH) and the Separating Axis Theorem (SAT), it offers rapid and accurate collision detection. The library supports RayCasting, offsets, rotation, scaling, and optimizations for: bounding box, flags for non-moving and ghost/trigger bodies and collision groups filtering - making it an ideal choice for high-speed applications in gaming and simulations.
## Demos
- [Tank](https://jackie-aniki.github.io/check2d/demo/)
- [Stress Test](https://jackie-aniki.github.io/check2d/demo/?stress)
- [Stackblitz](https://stackblitz.com/edit/check2d)
- [CodePan](https://jackie-aniki.github.io/codepan/#/boilerplate/check2d?pans=console,html)
## Installation
```bash
npm i check2d --save
```