detect-collisions
v10.10.2025
Published
Polygons, Ellipses, Circles, Boxes, Lines, Points. Ray-Casting, offsets, rotation, scaling, padding, groups.
Downloads
13,724
Readme
detect-collisions
Moved
what was
detect-collisionsbecamecheck2dpackage moved here https://www.npmjs.com/package/check2d
sorry for confusion, update your
package.jsonwith 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
Installation
npm i check2d --save