Skip to content
An explanation of 2D collision tests in JavaScript
HTML TypeScript CSS JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib
src
template
test
.gitignore
.travis.yml
LICENSE.txt
README.md
build.js
index.html
package-lock.json
package.json
tsconfig.json
tslint.json
webpack.config.js

README.md

JavaScript 2D Collision Detection Build Status

Intersect is a collection of common 2D collision detection tests, written as a tutorial. Hopefully this saves you from the pain of hunting them down yourself, or trying to rip them out of physics libraries.

If you're looking for further reading, you are hurting yourself if you don't buy Real-Time Collision Detection. It is easily the best purchase you could make if you are learning about collision detection. There is also an excellent list of different algorithms here.

The code is written in TypeScript, but it's simple and should be easily portable to your language of choice. To get started, take a look at:

Note that the compiled JavaScript source is also available in the lib folder, if you find TypeScript difficult to read.

You can’t perform that action at this time.