1.4.0 • Published 7 years ago

simple-intersect v1.4.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

intersects

a simple collection of 2d collision/intersects functions, supporting points, circles, lines, axis-aligned boxes, and polygons

rationale

I wanted a simplified collection of collision functions that work across different shapes. If you want a more advanced implementation designed for pixi.js.

Live Example

https://davidfig.github.io/simple-intersect/

Installation

npm i simple-intersect

Usage

    var intesect = require('simple-intersect');
    var intersected = intersect.boxBox(x1, y1, w1, h1, x2, y2, w2, h2);

or

    var circleBox = require('simple-intersect/circle-box');
    var intersected = circleBox(x, y, r, x1, y1, w1, h1);

API

1.4.0

7 years ago

1.3.4

8 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago